Hello,

I am a complete noob here. I am trying to teach myself one step a time and a simple code like the one below is throwing errors because the BTCUSD does not exist. What am I doing wrong? Can anyone point me to a good working Crypto trading sample code, please?

I get errors with self.EMA but If I comment out the self.EMA, I get errors with the data.Bars and data.Ticks

It looks like that error message is telling me that the BTCUSD data does not exist but I don't know how to look into an error log, since the toast message is a very inefficient way to debug code.

def Initialize(self):
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

self.SetStartDate(2020,11,15) #Set Start Date
self.SetEndDate(2020,11,28) #Set End Date
self.SetCash(1000) #Set Strategy Cash

self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)

# Find more symbols here: http://quantconnect.com/data
symbol = self.AddCrypto("BTCUSD", Resolution.Minute)
#self.AddCrypto("ETHUSD", Resolution.Minute)
#self.AddCrypto("BTCEUR", Resolution.Minute)
#symbol = self.AddCrypto("LTCUSD", Resolution.Minute).Symbol

# create two moving averages
self.fast = self.EMA(symbol, 30, Resolution.Minute)
self.slow = self.EMA(symbol, 60, Resolution.Minute)

def OnData(self, data):
# via a tradebar dictionary (symbol - bar)
data.Bars["BTCUSD"].Close
# or via a ticks list:
data.Ticks["BTCUSD"][0].Close