Hello guys, here’s a function that closes the positions after x bars:
1
2
3
4
IFOnMarketAND(BarIndex-TradeIndex)>=xTHEN
SELLATMARKET
EXITSHORTATMARKET
ENDIF
But what if i would like to implement a function that does not close the position for at least x bars? Then just after that x bars let the system works normally with sl/tp/ts etc…?
Probably it’s more simple then i think, but i ask you for security.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.