Hi,

This is my first time playing with Futures Data. I tried to follow few examples but I get the following error

During the algorithm initialization, the following exception has occurred: Please register to receive data for symbol 'ES 0' using the AddSecurity() function. in Indicators.cs:line 2448 Please register to receive data for symbol 'ES 0' using the AddSecurity() function.

 

  1. I have following code in the initialization section
  2. def Initialize(self):
  3. self.SetStartDate(2022, 6, 12) # Set Start Date
  4. self.SetEndDate(2022,6,13) #Set End Date
  5. self.SetCash(50000)
  6. self.AddEquity("SPY", Resolution.Tick)
  7. # self.AddFuture("ES", Resolution.Tick)
  8. self.AddFuture(Futures.Indices.SP500EMini, Resolution.Tick)
  9. # Consolidate 1min SPY -> 1min Bars
  10. self.Consolidate(Futures.Indices.SP500EMini, timedelta(minutes=1), self.oneMinuteDataHandler)

 

Don't know what am I missing ? Please help

 

regards,

Avi

Author

Avi Dix

June 2022