It has nothing to do with NormalizeDouble. The last operator you used was (string). Reading the docs, you'd get:
(string) Converting double and float type variables should be as precise as possible, allowing you to only drop zeros in the fractional part.
In other part of the docs, you would read:
To convert real variables (double, float) to a string, we use the DoubleToString() function. The second parameter of this function determines the precision (the number of decimal places).
Print out your values to the precision you want.
Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't
use it. It's use is always wrong
- 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
Can some One help me how to avoid situation like this \
where after NormalizeDouble() we are have a digit ended like in the title (screen shot attached)
simple example source code :
#property strict
void OnInit()
{
double asd;
string qwe;
asd=iATR(NULL,0,12,0);
for(int i=1; i<30;i++)
{
asd= iATR(NULL,0,12,i)/Point;
asd= NormalizeDouble(asd,2);
qwe=qwe+"\n"+(string)i+" ATR = "+(string)asd;
}
Comment((string)qwe);
;
}
Thank YOu and Regards