So I have been trying out the Trend Following strategy on the blog. The code for entering is very simple:
`def should_long(self) -> bool:
return self.short_ema > self.long_ema
def should_short(self) -> bool:
return self.short_ema < self.long_ema`
However, I was wondering if there is a way to stop jesse from re-entering a trade after the stop loss is hit. For example, if using the code above and going long, if my stop loss is hit but the short ema is still greater than the long ema is there a way I can code for jesse to not go long again even though the conditions are met? I don't know if this already taken care of but I know that lagging indicators will 'absorb' quick spikes or drops in price which may trigger a stop loss. I think I would use vars and possibly indexes somehow? Any help appreciated.