OrderProfit giving wrong value

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
54
d.saravana21 2015.10.15 10: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?..


avatar
12998
WHRoeder 2015.10.15 19: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);                  }
    

avatar
54
d.saravana21 2015.10.15 22:11 #
 

Thank you brother @WHRoeder..


Back to topics list   | 1 2  

To add comments, please log in or register