Need some indicator help.

I want to take a ratio of two prices, say (SPY.price / TLT.price), then put that value into an indicator like RSI or SMA. So I have this code, but I must not be putting it in the right places.

I put this "self.ratio = self.Securities["SPY"].Price/self.Securities["TLT"].Price" in OnData.

And put this in Initialize "self.sma = self.SMA("self.ratio", 30, Resolution.Daily)"

Author