Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 417 1...410411412413414415416417418419420421422423424...1965 New comment Roman Sharanov 2018.01.15 12:55 #4161 Does anyone know how to disable "trade averaging" in MQL5?So that all trades will open individually and not merge into one huge one? Alekseu Fedotov 2018.01.15 12:58 #4162 RomanRott: 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 Konstantin Erin 2018.01.15 13:06 #4163 RomanRott: 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 nicholish en 2018.01.15 15:46 #4164 Yurij Kozhevnikov : Comparison of numbers with a floating point for equalitybool ( fabs (number1-number2) < _Point / 10 * 5 ) [Deleted] 2018.01.15 15:51 #4165 nicholishen: Comparison of numbers with a floating point for equalityThere is a floating point number, you may have converted it to an integer. There are also inverse warnings of type (int) [Deleted] 2018.01.15 15:59 #4166 nicholishen: Comparison of numbers with a floating point for equalityYou are converting one number formation to another, you don't even need to look at the code.IntDoubleis a different thing nicholish en 2018.01.15 16:05 #4167 Vladimir Zubov : 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 [Deleted] 2018.01.15 16:09 #4168 nicholishen: This method is accurate for testing the equality of two different doubles and is faster than NormalizeDouble(num1-num2,_Digits)==0.0int = 0;ordouble = 0.0;is not correct! nicholish en 2018.01.15 16:14 #4169 Vladimir Zubov: int = 0;ordouble = 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 [Deleted] 2018.01.15 16:54 #4170 nicholishen: NormalizeDouble returns type double so either way you type it it is a double comparison. https://www.mql5.com/en/docs/basis/operations/relationIf you have any questions, please contact the English branch 1...410411412413414415416417418419420421422423424...1965 New comment
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