English

## code 100.0 pips

 37 Max-Enrik 2016.04.18 00:21 #   GumRai: You will have to write your question so that we know what you are askingI need to plus 100pips to "openDay"`string lvl_plus100pip = DoubleToStr( dayOpenPrice * 0.01 );` Above code for EURUSD but when I use that code for USDJPY it does not work until when I change it like below. `DoubleToStr( dayOpenPrice * 1.0 );`
 12983 WHRoeder 2016.04.18 03:25 #   Max-Enrik: How can I get code for 100.0 pips?There is Tick, PIP, and Point. They are all different in general. A tick is the smallest change of price. A Point is the least significant digit quoted. In currencies a pip is defined as 0.0001 (or for JPY 0.01) On a 4 digit broker a point (0.0001) = pip (0.0001). [JPY 0.01 == 0.01] On a 5 digit broker a point (0.00001) = 1/10 pip (0.00010/10). Just because you quote an extra digit doesn't change the value of a pip. (0.0001 == 0.00010) EA's must adjust pips to points (for mq4.) In currencies a tick is a point. Price can change by least significant digit (1.23456 -> 1.23457) In metals a Tick is still the smallest change but is larger than a point. If price can change from 123.25 to 123.50, you have a TickSize of 0.25 and a point of 0.01. Pip has no meaning. This is why you don't use TickValue by itself. Only as a ratio with TickSize. See DeltaValuePerLot() ```#define  CHANGE         double      ///< Difference of two prices. #define  POINT          int         ///< `CHANGE / _Point`. #define  PIP            double      ///< `POINT / PipsPerPOINT`. CHANGE   points_to_change(POINT n){          return n * _Point;                } POINT    change_to_points(CHANGE c){         return POINT(c / _Point + 0.5);   } CHANGE   pips_to_change(PIP n){     return points_to_change(pips_to_points(n));} PIP      change_to_pips(CHANGE c){  return points_to_pips(change_to_points(c));} POINT    pips_to_points(PIP n){              if( (_Digits&1) == 1)   n *= 10.0;                                              return POINT(n);                  } PIP      points_to_pips(POINT n){PIP p = n;  if( (_Digits&1) == 1)   p /= 10.0;                                              return p;                         } // Digits            DE30  EURNOK   USDJPY   EURUSD   USDMXN   USDZAR // Digits            1     5        3        5        4        5 // point             0.1   0.00001  0.001    0.00001  0.00001  0.00001 // ticksize          0.5   "        "        "        "        " // Pip/lot(USD)            1.19     8.23     10.00    0.60     0.73 // Spread                  214.8    1.9      2.3      351.4    181.7 // Spread/lot(USD)         256.31   15.64    23.00    211.97   133.33 ```100.0 pips?`double SL = OrderOpenPrice() - pips_to_change( 100 );`