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
}
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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!