Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 417
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
Does anyone know how to disable "trade averaging" in MQL5?
So that all trades will open individually and not merge into one huge one?
Does anyone know how to disable "trade averaging" in MQL5?
So that all trades will open individually and not merge into one huge one?
Switch from netting to hedge account
Does anyone know how to disable "trade averaging" in MQL5?
So that all trades will open individually and not merge into one huge one?
Averaging is done on a netting account. You need an account with hedging. It is specified when you open the account
Comparison of numbers with a floating point for equality
Comparison of numbers with a floating point for equality
There is a floating point number, you may have converted it to an integer. There are also inverse warnings of type (int)
Comparison of numbers with a floating point for equality
You are converting one number formation to another, you don't even need to look at the code.
Int
Double
is a different thing
a floating-point number, perhaps you brought it to an integer. There are also backward warnings of type (int)
This method is accurate for testing the equality of two different doubles and is faster than NormalizeDouble(num1-num2,_Digits)==0.0
int = 0;
or
double = 0.0;
is not correct!
int = 0;
or
double = 0.0;
is not correct!
NormalizeDouble returns type double so either way you type it it is a double comparison. https://www.mql5.com/en/docs/basis/operations/relation
If you have any questions, please contact the English branch