Calculate Net Profit Per Currency Pair

 

I've got an EA that runs on multiple currency pairs and I want to display on the chart the total net profit for that respective pair that the EA has made or lost.

How would I calculate this?

 
There is an indicator in the code base that will plot the partial equity curve per currency into an indicator window. Simply attach this indicator to the chart where the EA is running on.
 

Thanks 7bit, although I have already looked at this indicator and it is not what I am looking for. I just want to simply calculate the profit as an integer on the chart per currency pair. Just a simple line of code is all im looking for.

 
Beakon:

I've got an EA that runs on multiple currency pairs and I want to display on the chart the total net profit for that respective pair that the EA has made or lost.

How would I calculate this?

    for(int pos=0; pos < HistoryTotal(); pos++) if (
        OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY)   // Only orders
    &&  OrderMagicNumber()  == magic.number             // w/ my magic number,
    &&  OrderSymbol()       == Symbol()                 // and my pair.
    &&  OrderType()         <= OP_SELL){    // Avoid cr/bal https://forum.mql4.com/32363
        profit += OrderProfit()+OrderCommission()+OrderSwap();