Not sure, maybe something like this will do it?
Odd! SRC won't work with this post for some reason!
double B=Bid; if(Digits==5 ||Digits==4) { double r=NormalizeDouble(B-(MathFloor(B*100)/100),5); if(r==0.0090 || r==0.0010) Print("true"); }
- GumRai: Odd! SRC won't work with this post for some reason!
Happens sometimes (JS gets confused.) Copy what you need (the html,) back out of the edit form, control-refresh, edit again. -
double r=NormalizeDouble(B-(MathFloor(B*100)/100),5); if(r==0.0090 || r==0.0010)
This fails on JPY where digits < 4. This is also subject to floating equals problems The == operand. - MQL4 forum int BidPips = int(Bid / pips2dbl) % 100; if( BidPips == 90 || BidPips == 10) ...
WHR your code will introduce a rounding error of 1 pip sometimes too
SDC: WHR your code will introduce a rounding error of 1 pip sometimes too
| Yep, probably should round to nearest pipint BidPips = int(Bid / pips2dbl + 0.5) % 100; |

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 all, I need to build a control to find this situation
If (Bid contains 0.0010 or 0.0090) then (...)
For instance bid is 1.3810 or 1.3890. How can I isolate the 10 and 90 round numbers?
Thank you!