Hi,
I would like to define a time exit in a trading system where it sell the position after 5 days. How do I define that?
I would also like to know how to define a sell of a postion at close of the first day with profit but with a maximum of 5 days. How would that be defined?
Best regards,
Sebastian B
Hi,
Yes, on a daily TF, please.
Best regards,
Sebastian B
Exit after N days:
N = 5
If OnMarket and ((BarIndex - TradeIndex) >= N) Then
Sell at Market
Exitshort at Market
Endif
Exit after N days or earlier if in profit:
N = 5
If OnMarket and (((BarIndex - TradeIndex) >= N) or (PositionPerf > 0)) Then
Sell at Market
Exitshort at Market
Endif
Thank you so much for the help!
Best regards,
Sebastian B