OPEN-SOURCE SCRIPT
已更新

Amd range by dan

132
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
發行說明
Fixed the bug on Alerts System

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。