Hello everyone.
I have a simple strategy using the Algorithm Framework, Universe to scan for symbols with average 30 days volume > 1M, 2$ < price < 500$, also sorting based on ROC values.
SPY is added to my universe, since it is the main part of the strategy.

Later on in the Alpha, I am using History to get SPY history data, to manually update my EMA indicator.
The strategy is based on a regime filter, if SPY closed > 50 dEMA the filter is off, and its ON when SPY closed < 50 dEMA.

Alpha will generate an Insight based on the regime filter i've described.

Running a backtest from 20/1/2021 or any other different date, will produce different results than expected.
Not sure if I can link to another trading platform to see their chart, but SPY is not below its 50 dEMA on 29/1/2021, as the close is 370.07 and 50 daily EMA is 369.90.

Something is very odd about my EMA values, they are completly off, not matching a straight forward QC algorithm that uses self.SetWarmUp(), nor TradingView's SPY chart. 

And the wierdest thing is that when running from 25/1/2021 to 1/2/2021 the regime filter is OFF (spy > 50 dEMA) and 50 dEMA value is 369.89. (even if decreasing the lookup window from 500 to 490 to compensate for those 5 days difference to see if its the lookup request's fault)

(I am using 2 methods of defining EMA's and using history that produce the same result.)

I also believe that my Universe has the same issue so I'm not really getting symbols that have avg vol(30) > 1M.

Please help me understand what is going on.. I can't build upon my strategy any further with wrong indicator values..

Best,
Ido Elmaleh.

Author