This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Filter digits x.xx85


Back to topics list
avatar
44
Alexac04 2005.05.28 22:06 
i have problem programming


not get long on a trade above the last two numbers above 85 through 15 or short with the last two below 15 through 85.

Close = x.xx15
Close = x.xx85

how filter last two numbers in MQL ?
avatar
23
Matias 2005.05.29 10:46 
Alex,

Here is a quick and dirty way.

    double priceToCheck = Bid;
    string s = DoubleToStr(priceToCheck,MarketInfo(Symbol(), MODE_DIGITS) );
    Print( "Last two digits of " , priceToCheck, "=", StringSubstr(s, StringLen(s) - 2) );
  



Hope this help

Matias Romeo
Custom Metatrader Systems
matiasdotromeoatgmail.com

avatar
44
Alexac04 2005.05.29 16:43 
Yes
Thanks
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets