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
That's it? It's not going to glitch?
Vladimir, why are you doing this inside OnCalculate()? I mean the last two lines - reinitialization of arrays. You have both buffers calculated on each bar, it's an unnecessary action.
It's not the code that's glitchy. :) Take it and use it.
Thank you:))))))))))))))))))))))))))))))))))))))))))))))))))
Who's next?
Why have you decided that initialisation will take place on every tick? The condition prev_calculated==0 is executed once or twice at indicator start. During the operation prev_calculated==0 may become if the history is changed - but it rarely or even never and the change of history requires recalculation of the indicator.
What makes you think that initialisation will take place on every tick?
Where did I write that? I was asking why you re-initialise the buffers in OnCalculate() if you then have both buffers calculated on all bars.
Thank you:))))))))))))))))))))))))))))))))))))))))))))))))))
Who's next?
Why lie?
Incorrect statement. When prev_calculated==0, I subsequentlybypass all bars, butit does not guarantee replacement of all values inindicator buffers. Therefore, at prev_calculated==0 I need to clear indicator buffers.
Yes? Can you give me an example of when in your code some value of some buffer will not be filled? Except maybe the very first bar in the story.
Why lie?
Genius.
Have you tried switching to a pair with no history and then switching to another TF?
It wasn't a statement, it was a question.
Yes? Maybe you can give us an example, when in your code some value of some buffer will not be filled?
You know, let's do this: take code 1.43 from this post and comment out the lines:
and look at the result when scrolling the graph to the back of the history and have the history loaded.