How to calculate total Lots and total profit as points? Attn: Roger and Ais Pls help?

 
Hi,
Anyone know how to coding below function for the EA.
1) if i open position more than 2 currency pair, how to calculate the total lots and total profit show as points(show on pips not money)?
Please provide example.
Thank you very much, your help will much appreciate.
Shams
 
string Sym="";

int PIPS;


for(int i=OrdersHistoryTotal(); i<=0; i--)

{ // begin for loop
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);

Sym=OrderSymbol();

if(Sym=="EURUSD")
{
PIPS=(OrderClosePrice()-OrderOpenPrice())/Point;
Print("EURUSD PIPs = ",PIPS);
}

if(Sym=="USDJPY")
{
PIPS=(OrderClosePrice()-OrderOpenPrice())/Point;
Print("USDJPY PIPs = ",PIPS);
}
} // end for loop



 
FXtrader2008 wrote >>
string Sym="";

int PIPS;


for(int i=OrdersHistoryTotal(); i<=0; i--)

{ // begin for loop
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);

Sym=OrderSymbol();

if(Sym=="EURUSD")
{
PIPS=(OrderClosePrice()-OrderOpenPrice())/Point;
Print("EURUSD PIPs = ",PIPS);
}

if(Sym=="USDJPY")
{
PIPS=(OrderClosePrice()-OrderOpenPrice())/Point;
Print("USDJPY PIPs = ",PIPS);
}
} // end for loop




Dear programmer,

I want to show on the chart the

Total spread = xxx (in pips of the closed trades for the day)

Total pips = xxx (in pips of the closed trades for the day)

Total close = xxx.xx (in money value)

Total floating = xxxx.xxx (in money value)

Some of the above probably retrieval from the account history. The total is for one day i.e. from the broker open and close period. The value will be reset to zero on the next opening day/hour.

Any of the programmer can help how to create one.

Thanks.