I’d like to shift my plot to the left like you can do with the built in moving averages by using a negative “Horizontal shift” value when you add the moving average.
Thats good to know but its not what I’m trying to do. I want the indicator that I program to be shifted to the left relative to the price. If you look at my example the moving average is shifted to the left by 20 bars.
I get an error saying I must use a positive integer if I program the indicator like this:
x = average[1](close)[-6]
return x
How do they program the built in moving average to allow a negative horizontal shift?
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue