I have successfully made labels that show emas from the 5 minute, 1 minute, and daily time frames all on the 1 minute chart. I have an input for the timeframe, but when I select Week, it only displays N/A where every other time frame up to and including daily works. Here's the code:
Also. I turn plotting off and usually just use the label. Thanks in advance for the help!
Code:
# MTF Moving Average
input ChartType = {default CANDLE, HEIKIN_ASHI};
input Period = AggregationPeriod.WEEK;
input AvgType = AverageType.EXPONENTIAL;
input Length = 200;
input priceclose = close;
plot AVG = MovingAverage(AvgType, close(period = Period), Length);
AVG.SetDefaultColor(Color.YELLOW);
input label = yes;
AddLabel(label and yes, Concat("200/W EMA = ", Round(AVG, 2)), Color.CYAN);
Also. I turn plotting off and usually just use the label. Thanks in advance for the help!