Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 527
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
I do all my experiments with scripts. Run the script in your terminal. Change some lines or throw it away. See what happens
I want to find the Min Max of indicator data, I've done "everything according to the manual", but it feels like the indicator data is not written to an array. MQL pro tell me where I made a mistake.
I want to find the Min Max of indicator data, I've done "everything according to the manual", but it feels like the indicator data is not written to an array. If you are an MQL pro, please advise me where I made a mistake.
The variable limit has a value greater than zero. Therefore, none of the loops will run. As a result, ArrayGreen and ArrayRad will remain unfilled.
If we set limit to zero or less, the program will loop back to the first loop.
Thus, we need to modify the loops condition. Most likely, it should be done like this:
I want to find the Min Max of indicator data, I've done "everything according to the manual", but it feels like the indicator data is not written to an array. I have a good MQL pro, please advise me where I made a mistake.
Also, in iCustom(...........); the last passed parameter i
something like this.
Good afternoon!
For the convenience of testing, I want to remove the button to enable and disable the condition, so that I don't have to go into the code every time and don't have to change this condition into text to make it ineffective.
In other words, right now I do it this way:
Turning it off like this:
I tried to pull the enable and disable into input bool Y=True; (Where Y is the condition), assign Y to the condition, and split branches if the condition is or is not in effect via else if. But something didn't work out.
Can you advise how to proceed in such cases?
Good afternoon!
For the convenience of testing, I want to remove the button to enable and disable the condition, so that I don't have to go into the code every time and don't have to change this condition into text to make it ineffective.
In other words, right now I do it this way:
Turning it off like this:
I tried to pull the enable and disable into input bool Y=True; (Where Y is the condition), assign Y to the condition, and split branches if the condition is or is not in effect via else if. But something didn't work out.
Please, advise what to do in such cases?
One could do the following
You could do this.
The reason is that the algorithm ignores the False condition and proceeds to the next conditions.
The algorithm will not go further, while it should ignore this condition when the code is False and go to the next conditions.
In my case, is it the only way to specify 2 branches?
Or is there an easier way?
In your version it turns out that if the value
The algorithm will not go further, while it should ignore this condition if it is False and go to the next conditions.
In my case, the only option is to write 2 branches?
Or is there an easier way?
In your version it turns out that if the value
The algorithm will not go further, while it should ignore this condition if it is False and go to the next conditions.
In my case, the only option is to write 2 branches?
Or is there an easier way?
Only this way