Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1169
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
Ono, ahaha, been looking for that file for so long. SPC.
The search fails because it's all in a hidden AppData folder.
Nowhere have I found how to round a double to the nearest smallest
Example:
As a result rounded to 0.16, if we count: 0.16 * 12 = 1.92, i.e. overshoot by 0.02 from 1.9
How to round 0.15833333 to 0.15
Nowhere have I found how to round a double to the nearest smallest
Example:
As a result rounded to 0.16, if we count: 0.16 * 12 = 1.92, i.e. overshoot by 0.02 from 1.9
How to round 0.15833333 to 0.15
For clarity
For clarity
Thanks, it works as it should!
Sorry for dumb question, but what if spread is fractional? The CopySpread function has int type and if the spread is 0.8, for example, it returns 1
Should return an '8'. Doing something wrong
Now clarified, the spread on the instrument is around 0.02 what should be returned in this case?
Who did you check with?
Now clarified, the spread on the instrument is around 0. 02 what should it return in this case?
It doesn't work like that
Like this for example
2020.01.03 21:16:32.818 Spred (BR-2.20,M1) 1, 0.0100000000000000512
2020.01.03 21:16:32.824 Spred (BR-2.20,M1) 1, 0.02000000000001023
2020.01.03 21:16:33.830 Spred (BR-2.20,M1) 1, 0.020000000001023
2020.01.03 21:16:34.371 Spred (BR-2.20,M1) 1, 0.0100000000000000512
2020.01.03 21:16:34.466 Spred (BR-2.20,M1) 1, 0.010000000000512
2020.01.03 21:16:34.570 Spred (BR-2.20,M1) 1, 0.0099999999999905
2020.01.03 21:16:34.585 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:34.591 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:34.629 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:35.321 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:35.335 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:35.352 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:35.684 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:35.790 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:35.981 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:36.220 Spred (BR-2.20,M1) 1, 0.010000000000000000512
2020.01.03 21:16:36.235 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:36.311 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:36.769 Spred (BR-2.20,M1) 1, 0.00999999999999990905
2020.01.03 21:16:37.373 Spred (BR-2.20,M1) 1, 0.0199999999999999602
2020.01.03 21:16:38.049 Spred (BR-2.20,M1) 1, 0.0199999999999999602