Hey Team,

I am trying to implement a custom fill model with universe selection and I am unable to get any Debug lines to print, meaning my custom model did not trigger. I am following these two examples:
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/CustomPartialFillModelAlgorithm.py

https://github.com/QuantConnect/Lean/blob/ea65c61dc8911222c251243cd9e02fb92976539d/Algorithm.Python/CustomModelsAlgorithm.py

In these examples they add the fill model right after using :

self.AddEquity("SPY", Resolution.Hour)


After searching online I understood I should use `SetSecurityInitializer` however, this hasn't worked for me.

What am I doing wrong?

Thanks,
Ido


 

Author