question about decima of marketinfo()

 

hi guy  i  notice  , my  broker  have 5  digit  before  dot  (example  bid or Ask  price 1.25636) ,  but  when i use marketinfo()  MarketInfo(OrderSymbol(),MODE_ASK)   return me only  4  digit ,  why ????

is possible required 5  digit  at  function ???  , exist some option or  trick  for have ???

thankz at all

 
faustf: is possible required 5  digit  at  function ???
  1. If you do not use #property strict, Print output's 4 digits. With #property strict:
    Data of float type are output with 5 digits after a decimal point. To output real numbers with another accuracy or in a predefined format, use the PrintFormat() function
    Print - Common Functions - MQL4 Reference
  2. You don't want to output 5, you want to output what the pair uses. (USDJPY is 2 or 3) Don't assume:
    string price_as_string(double p){return DoubleToStr(p, Digits);  }

 

hi @WHRoeder thanks  so much for reaply

i use  #property strict at top of  EA ,  but now i have  a little  bug    , sometime   print  4  digit  some time  5 digit  and  some time  17  digit

you have some idea??  thankz so mcuh

 
i  answer me  is normal because  take  a  realtime  price  thankz  and  when  the  price  is  a  0  like  1.5240  the  0  not  consider