Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1898
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
kasher of course, but the same).
Not the same. If we first write a tick and then shift the array, it is shifted 1 bar to the left, along with the rest of the ticks we shifted. But if we shift the array first and then write the value of the tick at the zero index, we first make room for the tick and then write it there. And, as a result, it is not shifted anywhere.
I've said it many times before: you can't do without a cycle!
I think I'm getting it right.
Trying to swap out the fillings, I get an error
Tried to swap the fill in, I get an error
Strange, why is it like this...? It looks like everything should work, only the ticks will be in their places, not shifted to the left.
P.S. The extra array should still have been added (as I said at the beginning). Otherwise, when a new bar appears, all the ticks will automatically shift to the left, because they are indicator buffers! Or we can track the moment when a new bar appears and shift the buffers, but already to the right.Not the same. If we first write a tick and then shift the array, it is shifted 1 bar to the left, along with the rest of the ticks we shifted. But if we shift the array first and then write the value of the tick at the zero index, we first make room for the tick and then write it there. And, as a result, it's not shifted anywhere.
Yes, in my case we should start with the first one, not the zero one.) good point.
SZY, although yes. first you have to shift and then assign null. no matter which way.
SZZY By overwriting the value of zero before the shift, we lose the value of the zero index.
What is ring buffer in µl
Yes, in my case you have to start with the first one, not the zero bar) is a good point.
Why? Zero bar is shifted together with all other bars to the left. And if we shift all the bars except for zero, we will get two equal values by the first and second indexes.
P.S. If we shift data, a free cell must always be overwritten. Otherwise, there will be two identical values in a row.
ZZZY overwriting the value of zero before the shift, we lose the value of the zero index.
That's my point exactly!
What is a ring buffer in an µl
Something like
or even
Something like.
or even
index shift in the array in µl. Although it should work. And by the way, weight of the index change cycle (which is a cycle) and assignment cycle should not differ much.