OPEN-SOURCE SCRIPT
Diupdate Amd range by dan

Amd Range – Multi-Timeframe Volatility Breakout Scanner
Overview
Amd Range automatically detects price compression structures (Inside Bars) and alerts traders in real-time when price breaks out of the established range. The indicator monitors multiple timeframes simultaneously and can track up to 5 symbols from a single chart.
Core Methodology – What This Script Does
This indicator is based on the classic Inside Bar pattern — a volatility contraction setup where a candle's high and low are contained entirely within the previous candle's range.
Detection Logic:
Master Bar Identification: On each bar close, the script checks if the current candle qualifies as an Inside Bar:
Current High < Previous High
Current Low > Previous Low
When this condition is true, the previous candle becomes the "Master Bar", and its high/low levels define the active range.
Real-Time Breakout Detection: Once a range is established, the indicator monitors every tick (not just bar closes) for a breakout:
Bullish Breakout: Current price exceeds the Master Bar High → triggers BUY signal
Bearish Breakout: Current price drops below the Master Bar Low → triggers SELL signal
One-Shot Alert System: Each range produces exactly one alert. Once broken, the range is deactivated and no further alerts fire until a new Inside Bar forms and subsequently breaks.
Multi-Timeframe Scanning
The indicator uses request.security() to scan six higher timeframes simultaneously:
M30, H1, H2, H4, H8, H12
Each timeframe maintains independent state tracking, so a breakout on H4 does not affect H1 detection.
Dashboard Display
The built-in table displays real-time status for each symbol/timeframe combination:
RNG (Gray): Active range – volatility contraction in progress
BUY (Green): Bullish breakout detected
SELL (Red): Bearish breakout detected
- (Dark): No active pattern
How to Use
Add the indicator to any chart
Configure symbols in the "Extra Symbols" input group to monitor additional assets
Enable/disable timeframes in the "Timeframe Alerts" input group
Create a TradingView alert with the condition "Any alert() function call"
Trade the breakout — BUY signals indicate price has cleared resistance; SELL signals indicate price has broken support
Inputs
Show Range Lines: Toggle horizontal lines marking Master Bar high/low
Show BUY/SELL Labels: Toggle visual labels at breakout points
Show Dashboard Table: Toggle the multi-symbol status table
Range Line Color: Customize line color
Timeframe Toggles (M30–H12): Enable/disable alerts per timeframe
Symbol 1–4: Additional symbols to monitor
Important Notes
Alerts fire immediately on breakout (no waiting for candle close)
Only one alert per range – no repeat signals
Designed for forex, crypto, and futures markets
Works on all standard chart types
Overview
Amd Range automatically detects price compression structures (Inside Bars) and alerts traders in real-time when price breaks out of the established range. The indicator monitors multiple timeframes simultaneously and can track up to 5 symbols from a single chart.
Core Methodology – What This Script Does
This indicator is based on the classic Inside Bar pattern — a volatility contraction setup where a candle's high and low are contained entirely within the previous candle's range.
Detection Logic:
Master Bar Identification: On each bar close, the script checks if the current candle qualifies as an Inside Bar:
Current High < Previous High
Current Low > Previous Low
When this condition is true, the previous candle becomes the "Master Bar", and its high/low levels define the active range.
Real-Time Breakout Detection: Once a range is established, the indicator monitors every tick (not just bar closes) for a breakout:
Bullish Breakout: Current price exceeds the Master Bar High → triggers BUY signal
Bearish Breakout: Current price drops below the Master Bar Low → triggers SELL signal
One-Shot Alert System: Each range produces exactly one alert. Once broken, the range is deactivated and no further alerts fire until a new Inside Bar forms and subsequently breaks.
Multi-Timeframe Scanning
The indicator uses request.security() to scan six higher timeframes simultaneously:
M30, H1, H2, H4, H8, H12
Each timeframe maintains independent state tracking, so a breakout on H4 does not affect H1 detection.
Dashboard Display
The built-in table displays real-time status for each symbol/timeframe combination:
RNG (Gray): Active range – volatility contraction in progress
BUY (Green): Bullish breakout detected
SELL (Red): Bearish breakout detected
- (Dark): No active pattern
How to Use
Add the indicator to any chart
Configure symbols in the "Extra Symbols" input group to monitor additional assets
Enable/disable timeframes in the "Timeframe Alerts" input group
Create a TradingView alert with the condition "Any alert() function call"
Trade the breakout — BUY signals indicate price has cleared resistance; SELL signals indicate price has broken support
Inputs
Show Range Lines: Toggle horizontal lines marking Master Bar high/low
Show BUY/SELL Labels: Toggle visual labels at breakout points
Show Dashboard Table: Toggle the multi-symbol status table
Range Line Color: Customize line color
Timeframe Toggles (M30–H12): Enable/disable alerts per timeframe
Symbol 1–4: Additional symbols to monitor
Important Notes
Alerts fire immediately on breakout (no waiting for candle close)
Only one alert per range – no repeat signals
Designed for forex, crypto, and futures markets
Works on all standard chart types
Catatan Rilis
Fixed the bug on Alerts SystemSkrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.