Total Open Lots calculation

[Deleted]  

Hello,


I am trading 6 simultaneous currencies.  I'd like to calculate the net open trades for each currency and add them together to know how many total lots are open.  Is anyone aware of some code that will accomplish this?


Thanks!

 
lynnk wrote >>

Hello,

I am trading 6 simultaneous currencies. I'd like to calculate the net open trades for each currency and add them together to know how many total lots are open. Is anyone aware of some code that will accomplish this?

Thanks!

int total=OrdersTotal();

double totalots=0;

for(int 1=0; i<total; i++)

{ OrderSelect(i, SELECT_BY_POS, MODE_TRADES)

totalots+=OrderLots(); //this gives the total no of lots opened in current ordes

}