Download MetaTrader 5

Shift the whole price curve X bars left in chart

To add comments, please log in or register
Frank Simon
15
Frank Simon  

Hello,

I'm very new in programming MT4 custom indicators an that's the reason for my very basic question. How can I shift all values of the whole price curve in the chart (e.g close/high/low etc.) continuously "X" bars in the left direction of the chart? This shifted values are "basic" values for further calculations. So this should not only be a graphical solution in the chart! Is it possible to realize my requirement with MT4?

Thank you all for your help,

Frank.

Keith Watford
Moderator
10570
Keith Watford  

You coud try SMA period 1 for each of the applied prices and shift however bars you want.

Frank Simon
15
Frank Simon  

Hello Keith,

thank you for your quick response. I got a solution for my own. So, there is no further demand for answers, anymore.


Thank you all,

Frank.

Alain Verleyen
Moderator
33589
Alain Verleyen  
Frank Simon:

Hello Keith,

thank you for your quick response. I got a solution for my own. So, there is no further demand for answers, anymore.


Thank you all,

Frank.

Please share your solution, a forum is not only to provide you something.
Frank Simon
15
Frank Simon  
Alain Verleyen:
Please share your solution, a forum is not only to provide you something.

Hello Alain,

I'm aware that a forum in general is not only a one way street. But if no one asks for my solution, I assume that my "beginner" problem was very trivial and a posting of my solution is superfluous.

So, here we are:

shift price left in chart

whroeder1
16278
whroeder1  
  1. Don't post images of code, please use the SRC button !
  2. Your method can only shift the lines back in time. Use co[i]=Close[i] and use SetIndexShift to shift the displayed line backwards or forwards.
To add comments, please log in or register