What a pain! You wouldn't need to force close exits after x bars if we had SWAP in the main engine letting SQX do its thing, right? You have to do this because of missing swap costs don't you?
Yes correct it can be used for that but I also use it for an exit signal that closes the first bar in profit after a certain number of bars.Having tested it further I think the way the code calculates it isn't very efficient as on higher time frames and hence fewer bars it can get through it. So I'm not sure if this can be improved or not.
Yes but that will also exit even if the position is loosing. I use the exit after xx bars only if in profit to close trades that are open too long. For example if trading intra day and the average trade length is 6 hours sometimes you can get outliers that are many days old so I'd just rather close them at the first profit bar.