- You are selecting the same order repeatedly.
- Filter by OrderType.
Dejan Krapez:
hi,
this is my code:
OrderType with OP_BUY or OP_SELL always working, now not working. For OP_SELL I got 4 number with ordertype Print(OrderType()) and I want only to use order type if is not pending order. Thanks.
Regards
for(int counter = 0; counter <= OrdersTotal() - 1; counter++) { if(OrderSelect(counter, SELECT_BY_POS)) { if(OrderSymbol() == Symbol() && OrderMagicNumber()==10 ) { // // // }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
hi,
this is my code:
OrderType with OP_BUY or OP_SELL always working, now not working. For OP_SELL I got 4 number with ordertype Print(OrderType()) and I want only to use order type if is not pending order. Thanks.
Regards