Overall Statistics
class HorizontalResistanceAutosequencers(QCAlgorithm):

    def Initialize(self):
        #Set start/end dates and cash    
        self.SetStartDate(2018, 12, 18)
        self.SetEndDate(2019, 10, 19)
        self.SetCash(1000000)
        equity = self.AddEquity("JNJ", Resolution.Daily, leverage=1.0)
        self.syl = equity.Symbol
        
        #Set Brokerage Model
        self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash)
        
        #Add Securities from symbols and set data normalization mode to raw
        self.Securities[self.syl].SetDataNormalizationMode(DataNormalizationMode.Raw)
        
        #set variables for setsignal
        self.open = []
        self.close = []
        self.high = []
        self.low = []
        self.volume = []
        self.time = []
        
        self.Schedule.On(self.DateRules.EveryDay(self.syl),self.TimeRules.AfterMarketOpen(self.syl,0),Action(self.SetSignal))
    
    def SetSignal(self):
        history = self.History(1, Resolution.Daily)

        for slice in history:  
            bar = slice[self.syl]
            self.open.append(bar.Open)
            self.close.append(bar.Close)
            self.high.append(bar.High)
            self.low.append(bar.Low)
            self.volume.append(bar.Volume)
            self.time.append(bar.Time)
            self.Debug("{0}: {1}: {2}: {3}: {4}: {5}".format(self.open[-1], self.close[-1], self.high[-1], self.low[-1], self.volume[-1], self.time[-1]))
            
    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
        '''

        # if not self.Portfolio.Invested:
        #    self.SetHoldings("SPY", 1)