Hello,
Normally we use the “SetIndexShift” for determining the position of the indicator in MT4. However, this position is fixed and once the program is started the shift cannot be changed any more.
I want to use an other Indicator to shift the current Indicator. So that must be done in the “Start” section of the program. But here is the question: How can I shift an Indicator in the future or the past in the “start” section of the program of the indicator. Is it possible?
<SNIP>
Please use this to post code . . . it makes it easier to read.

Hello,
Normally we use the “SetIndexShift”
for determining the position of the indicator in MT4. However, this
position is fixed and once the program is started the shift cannot be
changed any more.
I want to use an other Indicator to shift the current Indicator. So that must be done in the “Start” section of the program. But here is the question: How can I shift an Indicator in the future or the past in the “start” section of the program of the indicator. Is it possible?
- Use SRC
- Use a maximum future shift value (maxShift) for SetIndexShift. Add/Sub shift from buffer index, e.g. buffer[i+maxShift-currShift] = value;
- Do NOT initialize indicator buffers (per the documentation) they've already be initialized
- Do NOT recalculate all bars, use indicatorCounted like the book says
Thanks for the advice!
Osiris_71
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Normally we use the “SetIndexShift” for determining the position of the indicator in MT4. However, this position is fixed and once the program is started the shift cannot be changed any more.
I want to use an other Indicator to shift the current Indicator. So that must be done in the “Start” section of the program. But here is the question: How can I shift an Indicator in the future or the past in the “start” section of the program of the indicator. Is it possible?
<SNIP>
So anyone has an idea to use the shift function in the “start” section ?
Regards, Osiris_71