Epic_Trades
New member
Is it possible to get the dailysma to start plotting premarket?
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2011-2022
#
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 9;
input displace = 0;
input showOnlyLastPeriod = no;
plot DailySMA;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
DailySMA = Double.NaN;
} else {
DailySMA = Average(fundamental(price, period = aggregationPeriod)[-displace], length);
}
DailySMA.SetDefaultColor(GetColor(1));
DailySMA.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);