i found this regarding jpy pips calculation.

 

reply from @whroeder1



double   pip        = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
int      pip_digits = (int)MathLog10(pip/_Point);
int      slippage   = 3 * int(pip / _Point);


but im not sure what does it mean ?

StringFind to find symbol contain jpy, but what is [ < 0 ? 0.01 : 0.0001 ] mean ??

and where should i put these thing ?

 
forextime8: StringFind to find symbol contain jpy, but what is [ < 0 ? 0.01 : 0.0001 ] mean ??
  1. Ternary Operator ?: - Operators - Language Basics - MQL4 Reference

  2. What is a TICK? - MQL4 and MetaTrader 4 - MQL4 programming forum

    Using Points means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
              How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum
 

thanks.

finally im understood what is it.


//--- normalize difference between open and close prices for a day range 
double true_range = (High==Low)?0:(Close-Open)/(High-Low);
   double true_range; 
   if(High==Low)true_range=0;               // if High and Low are equal 
   else true_range=(Close-Open)/(High-Low); // if the range is not null