Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1350
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
... Further to the previous question
Is there a capability of an exchange buffer between the Expert Advisor and the indicators open in the same chart?
I.e. the Expert Advisor puts something there, and the indicators read something from it.
Database
I have encountered a strange problem. While the EA is running, sometimes the EA is terminated due to division by zero.
Here is the line 1321.
How it's possible? Because in first condition " B " is not equal to zero. So in second case it can't be division by zero too. Or are the conditions checked out of order ?
Faced with a confusing problem.
You say correctly, the conditions are checked in order. If the first one is false, the second one is not checked.
However, your terminal is swearing at the 60th character in the string, while the division is at most 17. Perhaps it's not 'C.mqh' you're looking at.
I also like to do it like this:
However, you have the terminal swearing at the 60th character in the string, and the division is at most 17.
I have changed the string for easy reading. Here's the original.
The division sign is exactly in the 60th position.
Make a "B"print in front of the condition. What will it write?
I will try it. But unfortunately sparks only on real. And very rarely. We have to wait...
I'm doing as Alexei did, 2 ifs. In one ifa with logical AND also caught division by zero in the following ANDs. 2 ifas solved the problem.
And was also catching division by zero in the following E's. Two iphs solved the problem.
Thank you.