Jekkt / Publications
Forum
How to close a position automatically in MQL5 after x bars?
Hi all, I want to code an EA in MQL5 which closes a position after x bars (let´s say after 6 bars or after 6 days in D1 chart) regardless of whether it's a win or a loss. Normally the position is already closed 1-5 bars after entry because of a trailing stop but sometimes not. Therefore I would