ecoword:
I want the ea to count 10 bars after execute trade and close when trade is equal to 10.
if(OrderType() < 2) if(iBarShift(_Symbol, PERIOD_CURRENT, OrderOpenTime()) > 10) { if(!OrderClose(OrderTicket(), OrderLots(), OrderType() == OP_BUY ? Bid : Ask, 3, Violet)) Print("OrderClose error ",GetLastError()); }
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
I need help on ea, how to count bar after opening position (buy or sell). That is when ea open/execute order then count will start at next bar and close order when number of bar is equal to 10. This code only count bar from symbol history but does not start count when ea execute order. I want the ea to count 10 bars after execute trade and close when trade is equal to 10.