nirvaman:
hi guys.
Can you please tell me how can I close a opened order after 3 bars have happened?
I want to stables a time based close for my orders.
thanks
Happened to be working on this same problem.
//3 candles each candle being 5 minutes in the 5-minute time frame
if(TimeCurrent()-OrderOpenTime()>=900)
{
OrderClose(ticket,Lots,MarketInfo(Symbol(),MODE_BID),3,GreenYellow);
}
There could be several other ways.

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 guys.
Can you please tell me how can I close a opened order after 3 bars have happened?
I want to stables a time based close for my orders.
thanks