Nguyễn Thanh Sang:
Hi ALl!
Any wrong on my code why ea not continute send new OpenOrder .
I need continute send NewOrder() with delaytime=BarHold*timframe.
Thanks any review and help!
you should print something after every filter to find which one is always false
for (int i=0; i<OrdersTotal();i++) { if( OrderSelect(i,SELECT_BY_POS ,MODE_TRADES)) {Print("1"); if (OrderMagicNumber() == MagicNumber ) {Print("2"); if( OrderSymbol() == symbol) {Print("3"); if( OrderComment() == OrderTiming) {Print("4"); if ((OrderOpenTime()+60*BarHold*minute) < TimeCurrent()) //60 seconds * bars need hold * timeframe {Print("5"); SendOrder(symbol,tframe); break; } } } } }
![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 ALl!
Any wrong on my code why ea not continute send new OpenOrder .
I need continute send NewOrder() with delaytime=BarHold*timframe.
Thanks any review and help!