Download MetaTrader 5
To add comments, please log in or register
Publish your application in Cobe Base. Millions of traders will see it!
Saravanakumar D
360
Saravanakumar D 2015.10.15 08:28  
WHRoeder:
  1. Not clear? What part of Returns the net profit value (without swaps or commissions) confused you? What broker do you know charges commissions in pips?
  2. Tick Value must be used as a ratio

return(DeltaValuePerLot() * pips2dbl);

where the pips2dbl get value?..

whroeder1
14201
whroeder1 2015.10.15 17:01  
  1. Posted my code Why is there NO Complete EA within the Code-Base? - MQL4 forum It has not been adjusted for Build 600+.
  2. Now I use pips_to_change
    #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));}
    // Digits DE30=1/JPY=3/EURUSD=5 10 pt/PIP.  forum.mql4.com/43064#515262
    // tick 0.5       tick = point = 0.001
    POINT    pips_to_points(PIP n){              if( (_Digits&1) == 1)   n *= 10.0;
                                                 return POINT(n);                  }
    

Saravanakumar D
360
Saravanakumar D 2015.10.15 20:11  

Thank you brother @WHRoeder..

/ /12
To add comments, please log in or register