hello,
i can not directly answer your question, but what is the problem with having a loop? You can also put it in a function to use it easily; if your concern is about speed, i am almost sure, a loop can be as fast in mql code as in assembly (so, it should not matter if you use a ready-made function, or one you are writing your self, speed should be about the same ). But in any way, I assume you do not have to zero your array that frequently so a super speedy function could be even less of a concern :)
best regarsd
I have searched and tried to figure it out for a couple weeks without making a loop and setting each index to zero individually.
Is there a simple way to just clear all the indexes in the 2nd dimension? seems like Arrayinitialize() only clears the first dimension. Thanks.
template <typename Datatype> void ArrayMultiDimIni(Datatype& a[][], Datatype value){ int iFirst = ArrayRange(a, 0); int iSecond = ArrayRange(a, 1); while(iFirst > 0){ --iFirst; for(int iEnd = iSecond; iEnd > 0;) a[iFirst, --iEnd] = value; } }
template <typename Datatype> void ArrayMultiDimIni(Datatype& a[][], Datatype value){...}
Hi WHR,
how do you call that technique of datatyping ? Is there any info about at MQ4-Ref ?
Thanks
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have searched and tried to figure it out for a couple weeks without making a loop and setting each index to zero individually.
Is there a simple way to just clear all the indexes in the 2nd dimension? seems like Arrayinitialize() only clears the first dimension. Thanks.