Opening Range Dashboard
Opening Range Dashboard is an indicator drawn over the price chart.
tables and dashboardsstate
indicator "Opening Range Dashboard"pane: priceinput range_start = 09:30input range_end = 10:00state or_high: price = nastate or_low: price = nain_range = time_of_day between range_start and range_endif time_of_day == range_start:or_high = highor_low = lowelif in_range:or_high = max(or_high, high)or_low = min(or_low, low)background blue.fade(92), when: in_rangehline or_high, style: dashed, color: greenhline or_low, style: dashed, color: reddashboard position: top_right, rows: [["Range high", "{or_high:0.00}"], ["Range low", "{or_low:0.00}"], ["Width", "{or_high - or_low:0.00}"]]Opening Range Dashboard is an indicator drawn over the price chart.
You can change 2 inputs: range_start (default 09:30) and range_end (default 10:00).
It remembers or_high and or_low from one bar to the next.
It calculates in_range as whether the time of day is between range_start and range_end.
On each bar, it checks whether the time of day is range_start and, if so, sets or_high to the high and sets or_low to the low; otherwise, if in_range, sets or_high to the max (a or_high, b the high); it also sets or_low to the min (a or_low, b the low).
On the chart, it shades the background when in_range, draws a horizontal line at or_high, draws a horizontal line at or_low and shows a dashboard.