jeremyadorna
New member
Hi there. There is are studies DailyOpen, Daily Close, DailyHighLow already in TOS. It appears to capture the full timeframe, extended hours. How do i tweak the script for it to measure regular trading day only, ie. 09:30 - 16:00 ET? Here's the code for the DailyOpen as an example:
Thank YOU!
#
# 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);
Thank YOU!
#
# 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);