DR/IDR V1

Published on MillionChart by BreakoutTrader.

This script draws the Defining Range (DR) and Implied Defining Range (IDR) for the regular trading session and for the overnight session, following the rules of the creator of the DR/IDR concept. It is meant for the 5-minute timeframe and suits major forex pairs, BTC, ETH and US equity indices.

Session times (New York):
- Regular session range (RDR): 09:30 to 10:30.
- Overnight session range (ODR): 03:00 to 04:00.

Rules from the concept:
- If a 5-minute candle closes above the DR high after 10:30 or 04:00, the DR low is expected to hold as the low of the session. This is called confirmation.
- If a 5-minute candle closes below the DR low after those times, the DR high is expected to be the high of the session.
- A close above the IDR high after those times is an early hint that the DR low will be the low of the day, and vice versa.

Credits:
- The script imports the VisibleChart library, which returns values calculated from the range of visible bars. The author thanks bmistiaen for help with the code.