Plotting Series at specific bars
Author: gbullr
Creation Date: 5/20/2010 4:20 PM
profile picture

gbullr

#1
I have an indicator that requires for an sma to be less than it was LookBak days ago.

How do I plot sma[bar] - sma[bar-LookBak]

Thanks.

profile picture

Eugene

#2
Please see the "DataSeries" entry in the QuickRef. In other words, to shift a series you use the >> operator.
CODE:
Please log in to see this code.

There exists another possibility - just what you're looking for:

Shifted Moving Average (self-descriptive)
ShiftDelay (more universal)
profile picture

gbullr

#3
Thanks Eugene..

This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).