- Brian Lillard: I am reading an error of divide by zero
case 5: return(1/100000);
Of course it does.
On MT4 v434, division quotient don't give floating point values(Bug??) - MQL4 programming forum 2012.09.18 -
Your 1/nnnn is equivalent to _Point.
-
double normalize_price(double p, double d=0.0){ double tickSize = MarketInfo(_Symbol, MODE_TICKSIZE); if(d > 0) return round_up(p, tickSize); if(d < 0) return round_down(p, tickSize); return round_nearest(p, tickSize); } double round_down( double v, double to){ return to * MathFloor(v / to); } double round_up( double v, double to){ return to * MathCeil( v / to); } double round_nearest( double v, double to){ return to * MathRound(v / to); }

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
I am reading an error of divide by zeroAny help is appreciated