Programming Problem (MM) ! - page 2 12 New comment Marco vd Heijden 2016.08.16 09:59 #11 Mohammad Soubra: All not solve the trickBut thanks for all triesOf course they solve it.Those are not 'tries' those are working examples. Ernst Van Der Merwe 2016.08.16 10:30 #12 This modified NormalizeDouble() should work.double NormalizeDouble(int digits,double value) { long iValue=long(value*MathPow(10,digits)); double dValue=iValue/MathPow(10,digits); return(dValue); } Print(NormalizeDouble(0.015,2)); Print(NormalizeDouble(2,0.015)); 2016.08.16 10:21:03.234 test EURUSD,H1: 0.02 2016.08.16 10:21:03.235 test EURUSD,H1: 0.01 12 New comment
All not solve the trick
Of course they solve it.
Those are not 'tries' those are working examples.
This modified NormalizeDouble() should work.