I have a two hour horizontal line script. This script is for the current day. I'm looking for a script to draw a line every two hours RTH
9:30-11:30, 11:30-1:30, 1:30-3:30 3:30 to 4:00 for the previous days on the chart.
Here is the current script for current day.
def agg = AggregationPeriod.two_HOURS;
def o = open(period = agg)[0];
plot open_horizontal = if Between(GetTime(), RegularTradingStart(GetYYYYMMDD()), RegularTradingEnd(GetYYYYMMDD())) and GetDay() == GetLastDay() then o else Double.NaN;
open_horizontal.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Thank you in advance
9:30-11:30, 11:30-1:30, 1:30-3:30 3:30 to 4:00 for the previous days on the chart.
Here is the current script for current day.
def agg = AggregationPeriod.two_HOURS;
def o = open(period = agg)[0];
plot open_horizontal = if Between(GetTime(), RegularTradingStart(GetYYYYMMDD()), RegularTradingEnd(GetYYYYMMDD())) and GetDay() == GetLastDay() then o else Double.NaN;
open_horizontal.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Thank you in advance