Overall Statistics
class BasicTemplateAlgorithm(QCAlgorithm):
    def Initialize(self):
        self.SetStartDate(2017,8,6)
        self.AddEquity("SPY", Resolution.Daily)
        
        adx = AverageDirectionalIndex("", 14)
        
        bars = self.History("SPY", 30, Resolution.Daily)
        for bar in bars:
            adx.Update(bar)
        
        self.Debug("Is ADX ready? {}. Value: {}".format(adx.IsReady, adx))

    def OnData(self, data):
        if not self.Portfolio.Invested:
            self.SetHoldings("SPY", 1)