OPEN-SOURCE SCRIPT
PRO Live ATR Engine – 1H ATR(1) & ATR(5) for Lower Timeframes

✔ Accurate Live ATR(1)
Uses true range formula, not just high-low.
✔ Accurate Live ATR(5)
Rolling ATR that increases/decreases continuously as the hour forms.
✔ Works in Replay on 1m/5m
Does not rely on 1-hour candle closes.
✔ Only flags inside 09:20–09:25
No more random background outside your window.
✔ Correct “Do Not Trade” logic
If price is between midnight and 8:30, background turns red.
Uses true range formula, not just high-low.
✔ Accurate Live ATR(5)
Rolling ATR that increases/decreases continuously as the hour forms.
✔ Works in Replay on 1m/5m
Does not rely on 1-hour candle closes.
✔ Only flags inside 09:20–09:25
No more random background outside your window.
✔ Correct “Do Not Trade” logic
If price is between midnight and 8:30, background turns red.
สคริปต์โอเพนซอร์ซ
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
คำจำกัดสิทธิ์ความรับผิดชอบ
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
สคริปต์โอเพนซอร์ซ
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
คำจำกัดสิทธิ์ความรับผิดชอบ
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.