If it is for all symbols is there a function that returns the total orders open for the current symbol?
- OrdersTotal()
- testing multiple pairs
- Coding help
MetaNt:
Nvm I have found the function.
If anyone else is wondering.
OrdersTotal( ) returns the total number of pending orders for all symbols.
If you want to individualize the amount of pending orders for the current symbol, you might use:
for(int i=0;i<OrdersTotal();i++) { if(OrderSelect(OrderGetTicket(i)) && OrderGetString(ORDER_SYMBOL)==_Symbol) { // Your logic here } }
If you want to retrieve the number of pending orders for another symbol, you can substitute _Symbol by the desired symbol name, for instance:
OrderGetString(ORDER_SYMBOL)=="AUDCAD"
I hope it helps you somehow.
Malacarne
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