
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
Write to the CD about this too. Like "not everything in the review can be chosen in the tester".
Nah, rebound. I have two terminals open - Alpari, and MK, and switched back and forth, but in the latter I forgot to add EURGBP to the market overview.
I'm trying to create an array in the script that behaves like an indicator series. Namely, when a new entry appears, the whole array is shifted back and the new entry is made to a null position.
As they say, why?
Maybe I got it wrong, but it's the first thing that springs to mind - another bug in language optimization.
HZZY I also ask those folks who want to shift data using loops not to bother. This works fine for arrays of 5...100...1000..., but will not work for bigger arrays.
I'm trying to create an array in the script that behaves like an indicator series. Namely, when a new entry appears, the whole array is shifted back and the new entry is made to a null position.
As they say why?
And if we take class CArrayInt, and inserts there data?
I would like to be able to pass the array via parameters, while the array itself is private in the class.
Again, as far as I remember, this method is engaged in shifting the data in the loop, and it's pretty slow.
I'm trying to create an array in the script that behaves like an indicator series. Namely, when a new entry appears, the whole array is shifted back and the new entry is made to a null position.
As they say, why?
Maybe I got it wrong, but it's the first thing that springs to mind - another bug in language optimization.
HZZY I also ask those folks who want to shift data using loops not to bother. This works fine for arrays of 5...100...1000..., but will not work for bigger arrays.
As for "ZZI": your resizes don't fragment memory for you?
I don't know any other function (that allocates memory) in mql5.
HH And as far as I understood the direction of the array is also purely a virtual thing.
ZZY Apparently you have to work not with memory, but with address space virtualization. And this also slows down the work, direct access is faster after all.
I'd like to be able to pass the array via parameters, while the array itself is private in the class.
Again, as far as I remember, this method is just for shifting data in a loop and that's pretty slow.
I would have to think about improving array classes (for me).
Yes, a virtual insert on a zero position would be nice. But not to really move the data, otherwise it would be long and inefficient.
Anyway, it's bad that you can't work with memory directly, it has good virtualization acceleration, even C++ speed is 1.5 times faster if you address a cell address instead of an array.
I'm trying to create an array in the script that behaves like an indicator series. That is, when a new entry appears, the entire array is shifted back, and the new entry is made at the zero position.
ZZZY I ask comrades who want to advise to move data by the cycle not to worry, this option works well for arrays of 5...100...1000..., but at the larger size array is unacceptable.
But may I suggest not to move the entire array? :)
Dynamic array, new data is written to the end, size is changed/memorized, and AsSeries flag changes only indexation.
For normal order, it is N element of array, for "serial" Size-N-1.