I found few threads about NormalizeDouble -
--------------------
MY EA DOES NOT EXECUTE PARABOLIC STOP AND REVERSE (PSAR) CODE ON FOREXTIME, BUT IT DOES ON INSTATRADER
https://www.mql5.com/en/docs/convert/doubletostring

Documentation on MQL5: Conversion Functions / DoubleToString
- www.mql5.com
value is in the range between 0 and 16, a string presentation of a number with the specified number of digits after the point will be obtained. If the value is in the range between -1 and -16, a string representation of...
timothysmith78: I'm trying to normalize the bollinger band values into 5 digits from 6. it still shows 6 digits.
-
Floating point has infinite number of decimals, it's your not understanding
floating point and that some numbers can't be represented exactly. (like 1/10.)
Double-precision floating-point format - Wikipedia, the free encyclopediaSee also The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum
Print out your values to the precision you want with DoubleToString - Conversion Functions - MQL4 Reference.
-
Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't
use it. It's use is usually wrong, as it is in this case.
- Print out your values to the precision you want with DoubleToString - Conversion Functions - MQL4 Reference.
- SL/TP (stops) need to be normalized to tick size (not Point.) (On 5Digit Broker Stops are only allowed to be placed on full pip values. How to find out in mql? - MQL4 and MetaTrader 4 - MQL4 programming forum) and abide by the limits Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial and that requires understanding floating point equality Can price != price ? - MQL4 and MetaTrader 4 - MQL4 programming forum
- Open price for pending orders need to be adjusted. On Currencies, Point == TickSize, so you will get the same answer, but it won't work on Metals. So do it right: Trailing Bar Entry EA - MQL4 and MetaTrader 4 - MQL4 programming forum or Bid/Ask: (No Need) to use NormalizeDouble in OrderSend - MQL4 and MetaTrader 4 - MQL4 programming forum
- Lot size must also be adjusted to a multiple of LotStep and check against min and max. If that is not a power of 1/10 then NormalizeDouble is wrong. Do it right.

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
Hi MQL community,
I'm trying to normalize the bollinger band values into 5 digits from 6.
I tested using an alert and the value had been normalized correctly. However, when I run my EA in the strategy tester, it still shows 6 digits.
P.S. I have included a MQL4 to MQL5 converting file in the header.
Here is the test I ran:
Is this a known bug in the MT5 strategy tester?
Thanks, Tim