That is the problem that I meant: When shall adviseExitLong be true and when false? I'm at a loss here what this function should return.

How do you define the goodness of an exit without having an open trade?