This indicator plots Defining Range (DR) and Implied Defining Range (IDR) levels across Regular, After, and Overnight market sessions directly on the price chart.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
379 lines of Pine Script v5 from pine/libs/dr.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
DR/IDR visualizes high and low range boundaries, midline levels, opening lines, background boxes, and standard deviation projection lines. Main settings allow users to adjust session hours, line extensions, box styles, and standard deviation offsets. It is designed for session-based structure analysis and contains potential lookahead behavior in historical processing.
Defining Range and Implied Defining Range session levels
Support for Regular, After, and Overnight market sessions
Configurable range midlines and session opening lines
Standard deviation expansion lines and labels
Customizable background session boxes and line extensions
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Exchange Offset (hours)
int
0
exchangeOffset
RDR Time
session
0200-0300
regularTime
RDR Lines Time
session
0300-1100
regularExtend
ADR Time
session
1000-1100
afterTime
ADR Lines Time
session
1100-1900
afterExtend
ODR Time
session
1800-1900
overnightTime
ODR Lines Time
session
1900-0300
overnightExtend
Regular
bool
true
showRegular
After
bool
true
showAfter
Overnight
bool
true
showOvernight
Show DR Lines ?
bool
true
drlines
Show IDR Lines ?
bool
true
idrlines
Show all 40 settings
Setting
Type
Default
Variable
Show Middle DR Line ?
bool
false
middledrline
Show Middle IDR Line ?
bool
true
middleidrline
Show Opening Line ?
bool
true
openline
Extend
bool
true
extendopLines
extendopLinesType
string
XL1
extendopLinesType
Show DR/IDR Box ?
bool
true
showBackground
Box DR or IDR ?
string
BX1
boxType
Extend DR Lines ?
bool
true
extenddrLines
Extend IDR Lines ?
bool
true
extendidrLines
Show complete history ?
bool
false
showAllHistory
Box color based on open and close
bool
false
useBoxColors
Extend lines of all ranges to end of most recent Regular session?
bool
false
extendToEndOfRDR
Show STD Lines ?
bool
false
showStdLines
All
bool
true
showStdLinesAll
Labels
bool
true
showStdLineLabels
stdLineType
string
STDLT1
stdLineType
Dynamic (+)
int
0
stdLineDynamicExtraPos
(-)
int
0
stdLineDynamicExtraNeg
Auto
bool
false
stdLineDynamicExtraAuto
Static (+)
int
10
stdLineStaticExtraPos
(-)
int
10
stdLineStaticExtraNeg
Box And Lines Width ?
int
1
linesWidth
DR Line Color
color
color.gray
drLineColor
Style
string
LS0
drLineStyle
IDR Line Color
color
color.yellow
idrLineColor
Style
string
LS1
idrLineStyle
Middle Line Color
color
color.gray
middleLineColor
Style
string
LS2
middleLineStyle
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator builds Market Profile Time Price Opportunity (TPO) structures across defined session timeframes directly on the main price chart. It visualizes the Point of Control (POC) and Value Area boundaries using dynamic box drawings. An integrated multi-
This indicator plots auto trade signals for E-mini S&P 500 futures on the price chart. It computes an EMA200 filter along with day ETH RTH session levels and percentage-based entry zones. Signals trigger CALL or PUT cases when price crosses defined thresholds
This indicator plots reference levels for previous daily high and low prices directly on the price chart. It requests daily timeframe data using the security function and plots the offset values as continuous lines, displaying resistance in red and support in
The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh
Indicatorv6SMC / ICT / price actionSessions & time
This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow
This indicator plots reference levels and session markers directly on the price chart. It calculates and draws lines for the daily open, weekly open, monthly open, previous day OHLC, and previous week extremes, along with a selectable day-of-week range and ini