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
Sitting... Watching...
I will never believe that MQL5 and MQL4 were written by the same team.(((
MQ4 - flying...
MQ5 is child's play. No offence intended - but...(((
I haven't seen this thread... same thing...
The thing is, I'm not going to stupidly make checks on every line for all occasions confusing and cluttering up the code. If that's out of the question then... crutches are added, a big enough project is finally completely redone and working...
And in general, I'm just amazed at this approach... It turns out that not the first time such a question arises (and I'm sure more than once in the future will arise in other people), and every time "for the first time" to spend a lot of your and others' work time to explain what you need to do to bypass this bug ...
The only thing to do is to add into TESTER that recommended in that thread only ONE Sleep(1000) at start of Expert Advisor.
It must not be so that the shell would imply glitches, and those glitches must be avoided in the code. And the TERMINAL is working properly and correctly, there are NO ERRORS (in this situation). But the operation of the tester is DIFFERENT from that of the terminal.
ps EQU hello:)
Once again, I repeat. We recommended beforehand how to work with indicators, described it in documentation (someone just does not read the documentation).
Right after you create an indicator handle, there is no data yet. They must be calculated in a different thread. The fact that you immediately get data in the client terminal, consider it luck. Once again you may not get the data.
The tester is more deterministic than the terminal - everything is much more synchronous there. And immediately after creating a handle you will never get data. In this case "never" is equivalent to "sometimes". For "sometimes" you still need to arrange some kind of check. So put in a check loop with a slip. And everything will be as in life.
PS Well, don't create a new handle at each iteration - it's wrong from any point of view.
Once again, I repeat. We have recommended beforehand how the indicators should be handled and described it in the documentation (someone just doesn't read the documentation).
Right after the indicator handle has been created, there is no data yet. They must be calculated in a different thread. The fact that you immediately get data in the client terminal, consider it luck. Once again you may not get the data.
The tester is more deterministic than the terminal - everything is much more synchronous there. And immediately after creating a handle you will never get data. In this case "never" is equivalent to "sometimes". For "sometimes" you still need to arrange some kind of check. So put in a check loop with a slip. And everything will be as in life.
PS Well, you shouldn't create a new handle at each iteration - it's wrong from any point of view.
Then we need two functions (extra time...). This is taking into account the fact that the data for the indicator in the code are always different. Will it be ok?
Read the article Restrictions and checks in experts
Please advise. Is this line at the beginning of the EA necessary
If not, when is it needed?Please advise. Is this line at the beginning of the EA necessary
If not, when is it needed?This function checks if this checkbox is enabled:
Please advise. Is this line at the beginning of the EA necessary
If no, in what cases is it needed?This function checks whether this check box is enabled:
No, this is a message about another check box that is checked when the expert or script is started