int done=0; modify_orders(); void modify_orders() { if (done==1);return(); ///your code here done=1; return(); }

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
Hello
My ea has the problem does the OrderModify turns multible
for (int i=0;i<OrdersTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderComment() == Text && Hour() == (Start1 - 1) && Minute() >= 55 ){
if( OrderType() == OP_BUY && OrderProfit() != 0 ){ //no buy order
Ticket = OrderModify(OrderTicket(),OrderOpenPrice(),TL_Long,OrderTakeProfit(),OrderExpiration(),Blue);
}
if( OrderType() == OP_SELL && OrderProfit() != 0 ){ //no sell order
Ticket = OrderModify(OrderTicket(),OrderOpenPrice(),TL_Sell,OrderTakeProfit(),OrderExpiration(),Green);
}
}
}
Sleep(300000);
return(0);
what can i do that this runs only one time?
kind regards