Hello everybody

 

 

I was trying to create a strategy that would sell a short put spread (bullish) with a SMA 200 days filter.

So it would only short the put spread if the momentum is bullish following the 200 days SMA.

 

The problem I have is that the strategy doesn't mind the SMA crossover condition.

 

Do you guys have an idea on how to fix this?

 

(Please excuse me for the irrelevant files and name of the notebook as only main.py is relevant)

 

 

Thanks a lot