Hi I am trying to create pivot points from previous month bar. I have a custom monthly consolidator class, created a dict ‘monthlyBar’ to store the consolidated tradebar and am trying to complete the calculations in OnSecuritiesChanged but when calculating pivot point I get an error that  ‘MonthlyBar' object has no attribute ‘close’ (just trying to get anything before do whole calculation). 

  1. How do I use my monthly consolidator tradebar in OnSecuritiesChanged or OnData?
  2. Will my monthly consolidator automatically update at beginning of new month for securities that remain in the universe?

 

            #--------------------------------------------------------------------------

            #if symbol not in self.pp:

             #   history = self.monthlyBar[symbol].close

              #  self.pp[symbol] = history[0]

            #--------------------------------------------------------------------------