@eklonsousa Counting the bars is very useful trick, but it gets messy if you have multiple orders.
To get x candles expiration instead of x time expiration, I would just convert the desired bars to a time value , all the requirements are there.
https://docs.mql4.com/chart_operations/periodwindow
Closed market will be a problem, though.






