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
In short, the conclusion is this.
We manually count the difference between counted and uncounted bars, and if it's more than 1...
we reset all buffers at once or element by element.
It is not nice. Maybe the developers will reset all the same if there is a condition?
In short, the conclusion is this.
We manually count the difference between counted and uncounted bars, and if it's more than 1...
we reset all buffers at once or element by element.
It is not nice. Maybe the developers will reset all the same if there is a condition?
In short, the conclusion is this.
We manually count the difference between counted and uncounted bars, and if it's more than 1...
we reset all buffers at once or element by element.
It is not nice. Maybe the developers will reset the buffers themselves if there is a condition?
Again?! © :D And this after all explanations with examples how to write indicators correctly? )))
What, again?!! © :D And this after all the explanations with examples of how to write indicators correctly? )))
So. In my variant and in yours there is zeroing, no?
In my version, each bar is calculated. If the buffer value on such a bar should be zero, it will become zero, if it should be equal to 5, it will become 5. In your case, you can simply null the buffers through ArrayInitialize() and then do not calculate those bars where the buffers' value should remain null. But first, this is a bad programming style (very bad!), and second, this is a special case.
All bars should be calculated explicitly. Only this way you can be sure that there will be no "rubbish", uncalculated data, etc. in any cell, and you won't have to catch bugs (which you struggled with in this thread).
And you don't need to keep track of history updates either, it's unnecessary. Just start calculation from bar [rates_total - MathMax(prev_calculated, 1)], and everything will be always guaranteed to be calculated and recalculated, if necessary.
In my version, each bar is calculated. If the buffer value on such a bar should be zero, it will become zero, if it should be equal to 5, it will become 5. In your case, you can simply null the buffers through ArrayInitialize() and then do not calculate those bars where the buffers' value should remain null. But first, this is a bad programming style (very bad!), and second, this is a special case.
All bars should be calculated explicitly. Only this way you can be sure that there will be no "rubbish", uncalculated data, etc. in any cell, and you won't have to catch bugs (which you struggled with in this thread).
And you don't need to keep track of history updates, it's unnecessary. Just start calculation with bar [rates_total - MathMax(prev_calculated, 1)], and everything will always be guaranteed to be calculated and recalculated if necessary.
Ouch. Ok.
Developers won't implement anything anyway.
Thanks to all.