bool Has_Robot_Orders() {
// monitor all
int buys = 0, sells = 0;
for (int i = 0; i < OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false)
break;
if (OrderSymbol() == Symbol() && IsRobotOrder(OrderMagicNumber())) {
if (OrderType() == OP_BUY) return(true);
if (OrderType() == OP_SELL) return(true);
}
}
return(false);
}
- Styler - Developing programs
- Projects and MQL5 Storage
- Settings - Welcome to algorithmic trading

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