Consider the above code. Lets assume that the short condition was met but the stopLoss condition was never met hence ApplyStop() did not actually come into play because the price did not reach (shortPrice +10 pts) and eventually SystemExitTime was hit. What i can see is that Equity(1) is negating the cover signal (SystemExitTime). So the above code generates a short signal but no cover signal. If i comment out Equity (1) then it works fine. But i need Equity(1) to visualise ApplyStop(). Can someone please explain this to me?
Please keep in mind that Equity uses last backtest settings. If your settings are so that you do not have “Long and Short” selected it will remove short side.