no, OrdersTotal() even on a chart without orders return the total orders in terminal
qjol:
no, OrdersTotal() even on a chart without orders return the total orders in terminal
No, OrdersTotal() return total all opening order (contents pending orders) in terminal (flatform).
Total of all open (filled and pending) orders. That's why you must filter
for(int pos = OrdersTotal() - 1; pos >= 0; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() ){ // and symbol
Thanks
very informative i have confusion over OrdersTotal function and this discussion clears my concept too
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
This should be an easy question:
Does the OrdersTotal() function return the number of open orders for whatever chart the EA is loaded on, or does it return the total amount for the account? I.E., If I have the same EA loaded on say 4 different charts, and only one of them launched orders, are the other EAs going to return OrdersTotal()>0 as well?
And, yes, i looked in the documentation, but it didn't specifically address this.