OPEN-SOURCE SCRIPT
ที่อัปเดต: 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
เอกสารเผยแพร่
Fixed the bug on Alerts Systemสคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน