My ea running in one single pair ...but i hv others pair trade running in terminal
how my EA collect and sum all buy and sell profit for that pair only where/which pair he is running/active?
is this code works?
how my EA collect and sum all buy and sell profit for that pair only where/which pair he is running/active?
is this code works?
Inserted Code
for(int pos=0; pos < HistoryTotal(); pos++)
if ( OrderSelect(pos, SELECT_BY_POS, MODE_TRADES) // Only orders
&& OrderMagicNumber() == magic.number // w/ my magic number,
&& OrderSymbol() == Symbol() // and my pair.
&& OrderType() <= OP_SELL
&& OrderType() <= OP_BUY){
profit += OrderProfit()+OrderCommission()+OrderSwap();