This algo has 2 additional functions to OnData function that are strike_selection, which select call and put options to trade, and the find_support function to get limit order price based on the nearest sma.


The issues with this algo that I need to fix are the following:

1- Sometimes the algo doesn't buy options in certain dates. This algo is designed to buy SPY when VIX is high and at the same time, sell call and put options for each SPY purchase.
There are certain dates such as 10/10/2018 that algo buy SPY but doesn't buy options. Why can this happen?

2- Second issue is that the algo run to slow. Do you know what can be the cause of this??

I really appreciate the support.
Regards,
Nicolás