Hey all,

Working on a very simple algorithm but am having trouble graphing two Indicators, and am not sure what I'm doing wrong as I'm following the docs:

from datetime import timedelta

class OptimizedMultidimensionalAtmosphericScrubbers(QCAlgorithm):

#
# buy when the SMA-200 > SMA-50
# sell when the SMA-200 < SMA-50
#

def Initialize(self):
self.SetStartDate(2020, 5, 9)
self.SetCash(1000)
self.equity = self.AddEquity("SPY", Resolution.Daily)
self.symbol = self.equity.Symbol

# warm up and create our SMA indicators
self.SetWarmUp(timedelta(200))
self.sma_50 = self.SMA(self.symbol, 50, Resolution.Daily)
self.sma_200 = self.SMA(self.symbol, 200, Resolution.Daily)

# setup the chart
my_chart = Chart("Indicator Chart")
my_chart.AddSeries(Series("SMA50", SeriesType.Line, 0))
my_chart.AddSeries(Series("SMA200", SeriesType.Line, 0))
self.AddChart(my_chart)

def OnData(self, data):
if not self.sma_50.IsReady or not self.sma_200.IsReady:
pass

self.Plot("Indicator Chart", "SMA50", self.sma_50)
self.Plot("Indicator Chart", "SMA200", self.sma_200)

def OnWarmupFinished(self):
if not self.Securities[self.symbol].Invested:
self.SetHoldings(self.symbol, 1.0)

Error I get is:


Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the Plot method. Please checkout the API documentation.
at OnData in main.py:line 31

TypeError : No method matches given arguments for Plot (Open Stacktrace)

Now, if I remove the second argument of the Plot methods in OnData(), the backtest runs but I don't see the Indicators being graphed.  Any help is appreciated.