Good day,
I would like to display a moving average only on the last 6 bars only. I used “calculateonlastbars” but the longer period MA’s do not display the actual values. I just want to know how this can and should be done..if possible?
thank you,
kind regards.
Justin
Try this (not tested):
Defparam drawonlastbaronly=true
Avg = average[100]
For i = 0 to 5
DRAWSEGMENT(barindex[i],Avg[i],barindex[i+1],Avg[i+1])
Next
Return
Thank you I appreciate it! It works. 🙂