Hey, I want something simple. Just divide 2 symbols (get a ratio) and then  calculate a moving average of that ratio.

This code don't work:


def Initialize(self):
self.SetStartDate(2000, 1, 1)
self.SetEndDate(2020, 9, 1)
SPY = self.AddEquity("SPY", Resolution.Daily)
QQQ = self.AddEquity("QQQ", Resolution.Daily)
ratio = SPY / QQQ
SMA_ratio = SMA(ratio, 100, Resolution.Daily)

Is there a way to make this happen?