I expected CloseD to return the previous day's close on my intraday charts in order to plot Daily Moving Averages without inserting an invisible daily chart of the same instrument
Using just CloseD, however, all time frames plot the 20ema of that particular time frame. I did not expect that.
If CloseD is working as designed, what am I doing wrong?
Code: Select all
[IntrabarOrderGeneration = False]
inputs:
LELength( 20 ) ;
variables:
LEvar7( 0 ),
// Plot the Daily 20ema
LEvar7 = XAverage( closeD(1), LELength ) ;
plot1(LEvar7, "20ema Daily");