after the last update my EA stopped open new trades when i check it for errors it gives me this message
return value of 'OrderSelect' should be checked
that is a warning message not an error
for not getting this warning you can change the line to
if(!OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))break;
but then also it will not change your EA stopped
might be there is no open buy and open sell
you restarted the program and have that way
LongTrade = FALSE;
ShortTrade = FALSE;
that is a warning message not an error
for not getting this warning you can change the line to
but then also it will not change your EA stopped
might be there is no open buy and open sell
you restarted the program and have that way
LongTrade = FALSE;
ShortTrade = FALSE;
thanks for your reply, i have also this warnings maybe its the reason
this one on ordermodify
if (NewOrdersPlaced) { if (flag == TRUE) { for (cnt = OrdersTotal() - 1; cnt >= 0; cnt--) { if(!OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES))break; if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue; if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) OrderModify(OrderTicket(), NormalizeDouble(AveragePrice,Digits), NormalizeDouble(OrderStopLoss(),Digits), NormalizeDouble(PriceTarget,Digits), 0, Yellow); NewOrdersPlaced = FALSE; } } } return (0);
and this one on declaration of 'cnt' hides global declaration at line 40
for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
after the last update my EA stopped open new trades when i check it for errors it gives me this message
return value of 'OrderSelect' should be checked