Total profit in Pip

 

Can any expert help me how to get TotalProfit in PIP / Point suppose below code for getting Profit in Currency Terms how can I get this in PIP terms

 

double TotalCurProfit(int magic)
  {   
   double CurrentProfit = 0;
   for(int cnt = 0; cnt < OrdersTotal(); cnt++)
     {
       OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
       if(OrderMagicNumber() == magic)
         {
           CurrentProfit += (OrderProfit() + OrderSwap());
         }   
     }
   return(CurrentProfit);
  }
 
palashcr:

Can any expert help me how to get TotalProfit in PIP / Point suppose below code for getting Profit in Currency Terms how can I get this in PIP terms

 

Do you want something more than the difference between OrderOpenPrice() and OrderClosePrice() ?
 
RaptorUK:
Do you want something more than the difference between OrderOpenPrice() and OrderClosePrice() ?


Thanks for response Yea something look like that but i want total profit in PIP. I need to calculate total profit in PIP
 
palashcr:

Thanks for response Yea something look like that but i want total profit in PIP. I need to calculate total profit in PIP
So you want to include any swaps and commission too ?  So you are going to have to work back from the profit in your base currency and calculate the equivalent pip figure bearing in mind the trade size and TickValue.
 
RaptorUK:
So you want to include any swaps and commission too ?  So you are going to have to work back from the profit in your base currency and calculate the equivalent pip figure bearing in mind the trade size and TickValue.


Yea just for an example I have now 4 orders running in different lots

Lot  Profit

0.01  10

0.02  

0.03  -12

0.04   6

 Total profit now 10 in terms currency. In above description I need how many pips gain or how many pips losses here 

 
palashcr:


Yea just for an example I have now 4 orders running in different lots

Lot  Profit

0.01  10

0.02  

0.03  -12

0.04   6

 Total profit now 10 in terms currency. In above description I need how many pips gain or how many pips losses here 


but is it you want it calculate like

1*10  +   2*6   +   3*-12  +  4*6   =  10pips/10  =  1 pip / 0.01 lot 

 
deVries:


but is it you want it calculate like

1*10  +   2*6   +   3*-12  +  4*6   =  10pips/10  =  1 pip / 0.01 lot 


Yea I want it thanks deVries 

So it can be calculated as TotalProfit / TotalPIP 

 
palashcr:


Yea I want it thanks deVries 

So it can be calculated as TotalProfit / TotalPIP 


What if you have same time open buy and Sell then what do you want to calculate in that case ??