Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1168
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
Can you tell me if it's possible to loop through variables with names: L1, L2, L3 ... Ln to write to a two-dimensional array.
Example with three variables (in fact there are more variables, it's cumbersome):
THANK YOU for the reply. Full code. Increased static array size. Removed zero control entry in operators... Common "dummy". Still want to understand WHY it doesn't count addition. What is missing in my code now? Thanks for the tips. I haven't worked with static arrays in mql5 yet.....
I UPDATED THE CODE. The question is the same...
here are errors when compiling your code
Can you tell me if it's possible to loop through variables with names: L1, L2, L3 ... Ln to write to a two-dimensional array.
Example with three variables (in fact, there are more variables, it's cumbersome):
Of course, the topic is "crooked" (in MQL4 and MQL5), so it would be good to specify the platform to which the question is addressed ))))
Can you tell me if it's possible to loop through variables with names: L1, L2, L3 ... Ln to write to a two-dimensional array.
Example with three variables (in fact there are more variables, it's cumbersome):
And quite correctly, it's better to stick it in a structure.
Then the array will be able to change dimension in the first and in the second dimension. That is, it will be a one-dimensional array in a one-dimensional array.here are errors when compiling your code
It was me who shortened the code and Tf - I just didn't notice it. The question is fundamental, why elements from static array are not processed for calculation?
Here I have checked, compilation without errors))) Calculation result is the same - NULL !!! arrays open[], close[] etc - not so important....
I was shortening the code and Tf - I just didn't notice it. The question is fundamental, why elements from static array are not processed for calculation?
Here I checked, compilation without errors))) Calculation result is the same - NULL !!! arrays open[], close[] etc - not so important....
Compilation does not check for logical errors of the programmer himself - this is left to the conscience of the programmer, because the compiler is not yet able to read minds.
Of course, the topic is "crooked" (in MQL4 and MQL5), so it would be good to specify the platform to which the question is addressed)))
MQL4.
The compilation does not check for logical errors of the programmer himself - this is left to the conscience of the programmer, because the compiler is not yet able to read minds.
I am fundamentally looking for the reason where? in writing the existing code or is there something else in the code to process the static array?
I can't know what I don't know... So I ask an outside observer, with experience, to point out where I don't know)))am i principally looking for the reason where? in writing existing code or is there something else in the code to process the static array?
I can't know what I don't know... So I'm asking an outside observer with experience to point out where I don't know)))it doesn't get to the calculations.
here's an initialization
and here's a test condition