Hi,
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.
I can’t figure out how to do this in programming.
Any ideas?
Hi, if you mean future price, right click on main chart, choose “chart properties” and change default value of 3% to your desired (See image below)
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?
Nice question, i don’t know…but did you try this?
x = average[1](close)
y = x[6]
That code has the effect of shifting my indicator to the right. I want to go to the left
Tradestation allows you to plot back in time by using a plot1[-6] (x) type statement.
Is there a similar feature in prorealcode?
Sorry but it is not possible to draw things in the future on chart by code.