Hi Everyone,

I'm new to Quantconnect and relatively new to python. I wanted to test my code to check if my EMA was giving me the right value but unfortunately the log keeps printing "0". Is there something that I am doing wrong?


import numpy as np import clr clr.AddReference("System") clr.AddReference("QuantConnect.Algorithm") clr.AddReference("QuantConnect.Indicators") clr.AddReference("QuantConnect.Common") from System import * from QuantConnect import * from QuantConnect.Algorithm import * from QuantConnect.Indicators import * import decimal as d ### <summary> ### Basic template algorithm simply initializes the date range and cash. This is a skeleton ### framework you can use for designing an algorithm. ### </summary> class BasicTemplateAlgorithm(QCAlgorithm): '''Basic template algorithm simply initializes the date range and cash''' 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(2017, 10, 10) #Set Start Date self.SetEndDate(2017, 10, 19) #Set End Date self.SetCash(10000) #Set Strategy Cash # Find more symbols here: http://quantconnect.com/data self.SetBrokerageModel(BrokerageName.GDAX) self.AddCrypto("BTCUSD", Resolution.Hour) def OnData(self, data): '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here. Arguments: data: Slice object keyed by symbol containing the stock data ''' MA10 = self.EMA("BTCUSD", 10, Resolution.Hour) self.Log(MA10)