Plot pre-market data - even if "Show Extended Hours" is unchecked?


New member
Hey all, hopefully I can get some help with this. I'm using the script below on multiple small timeframe charts (1, 2, 5 minute). Right now it's able to get the 4am open, but only if the chart is set to show extended trading data is enabled.

I need to be able to plot these values, even if the extended session data is disabled: 4am premarket open, premarket high and low (after 4am). I'm at a loss as to how to do this. Any help is greatly appreciated. Thanks!

def newDay = GetDay() <> GetDay()[1];
def start = newDay or SecondsTillTime(400) == 0;
rec premarketOpen = if start then open else premarketOpen[1];
plot po = premarketOpen;

Similar threads