BrianPaul
New member
Hi,
I have the following indicator for daily open, but i want it to show the premarket open price at 4AM EST as opposed to the new york regular hours open price at 9AM EST. Can anyone help?
I have the following indicator for daily open, but i want it to show the premarket open price at 4AM EST as opposed to the new york regular hours open price at 9AM EST. Can anyone help?
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2011-2021
#
input aggregationPeriod = AggregationPeriod.DAY;
input showOnlyLastPeriod = yes;
def prevPrice = open(period = aggregationPeriod)[-1];
def price = open(period = aggregationPeriod);
plot DailyOpen = if showOnlyLastPeriod and !IsNaN(prevPrice) then Double.NaN else price;
DailyOpen.SetDefaultColor(GetColor(2));
DailyOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);