

It is not necessary in general, but it is necessary after you perform any operation on the double precision number (even a simple sum of two "valid" numbers may lead to an "invalid" number). And why? It is because the MQL implementation does not bother with adjusting (or tolerating) the double that is not exactly decimal. 

jollydragon: Is it still necessary to use NormalizeDouble() for 'stoploss' and 'takeprofit'?


DeepThought: It is not necessary in general, but it is necessary after you perform any operation on the double precision number (even a simple sum of two "valid" numbers may lead to an "invalid" number). And why? It is because the MQL implementation does not bother with adjusting (or tolerating) the double that is not exactly decimal.


WHRoeder:
Please ignore my inputs. Thank you. 

WHRoeder:
Dear WHRoeder, Thanks a lot for your clarification and help! 
You know 'stoploss' and 'takeprofit' are "double" types in OrderModify().
Is it still necessary to use NormalizeDouble() for 'stoploss' and 'takeprofit'?
e.g. I saw some EAs use NormalizeDouble(histroyPrice, Digits) to set the 'stoploss' or 'takeprofit' by OrderModify().
However, you know the histroyPrice is a double type as accuracy as the Digits number of decimal digits already.
Is it still necessary to NormalizeDouble(histroyPrice, Digits) now? Why? Thanks.