More correctly it wiil be such
if(stoplevel > buystoptotals && 0 < buystoptotals + buylimittotals + selllimittotals) { CleanAllPendings(magic,OP_BUYSTOP); //delete BuyStop order CleanAllPendings(magic,OP_BUYLIMIT); //delete BuyLimit order CleanAllPendings(magic,OP_SELLSTOP); //delete SellStop order } if(stoplevel > sellstoptotals && 0 < sellstoptotals + selllimittotals + buylimittotals) { CleanAllPendings(magic,OP_SELLSTOP); //delete SellStop order CleanAllPendings(magic,OP_SELLLIMIT); //delete SellLimit order CleanAllPendings(magic,OP_BUYSTOP); //delete BuyStop order } void CleanAllPendings(int magicNumber,int cmd) { if (cmd==OP_BUY || cmd==OP_SELL) return; for(int i=OrdersTotal()-1;i>=0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if ( OrderSymbol() != Symbol()) continue; if ( OrderMagicNumber() != magicNumber) continue; if ( OrderType() != cmd) continue; bool ticket = OrderDelete(OrderTicket(),CLR_NONE); } return; }
thanks Rosh. ^^
I've try to make my ea. but a lot want to ask and help again... ^^!
how to excute this same buytotals+buylimittotals, if drop -1 to execute?
egt520
I've try to make my ea. but a lot want to ask and help again... ^^!
how to excute this same buytotals+buylimittotals, if drop -1 to execute?
record totals if drop -1 if(buytotals + buylimittotals > buytotals +buylimitotals ) { execute }
egt520
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
coming again need help and ask some question.. ^^
the scripts net yet finish delete the order, above script to execute!!
how can do the scripts wait to finish and turn the next return above?
example stoplevel=5, sell sellstoptotals 5 drop 1 to execute to delete sellstop, selllimit and buystop, problem buystop not yet to finish delete, above script to take it??
thanks
egt520