Camilo Mora:
I am working on an EA that for the last candle uses, say the value 5 candles ago.
To visualize this, I use PLOT_SHIFT with a value of 5, so I can see the value 5 candles ago in the latest candle. Graphically looks fine.
The problem I am having is that this ruins the data I get in the CopyBuffer, like if they were offset by a random number. Is the handle of the indicator modified when using PLOT_SHIFT ?
In other words, when I use PLOT_SHIFT in MQL5, i move the graphic display, as well as the handle of the indicator?
When you use plot shift you are shifting the complete buffer by a certain value. So when using copy buffer you need take that shift value into account.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am working on an EA that for the last candle uses, say the value 5 candles ago.
To visualize this, I use PLOT_SHIFT with a value of 5, so I can see the value 5 candles ago in the latest candle. Graphically looks fine.
The problem I am having is that this ruins the data I get in the CopyBuffer, like if they were offset by a random number. Is the handle of the indicator modified when using PLOT_SHIFT ?
In other words, when I use PLOT_SHIFT in MQL5, i move the graphic display, as well as the handle of the indicator?