In an algorithm I have

  1. def Initialize(self) -> None:
  2. self.SetStartDate(2020,2,1)
  3. self.SetEndDate(2023,1,20)
  4. self.SetCash(100000)
  5. data_mode = self.AddEquity("EQT", Resolution.Daily)
  6. self.symbol = self.AddEquity("EQT", Resolution.Daily).Symbol
  7. data_mode.SetDataNormalizationMode(DataNormalizationMode.Adjusted)

The algo runs fine, but I was looking at the code and though, that does look weird, so I tried

  1. def Initialize(self) -> None:
  2. self.SetStartDate(2020,2,1)
  3. self.SetEndDate(2023,1,20)
  4. self.SetCash(100000)
  5. self.symbol = self.AddEquity("EQT", Resolution.Daily).Symbol
  6. self.symbol.SetDataNormalizationMode(DataNormalizationMode.Adjusted)

And this returned the error ‘'Symbol' object has no attribute 'SetDataNormalizationMode'’.   This is what I get trying to cobble code together from the documentation, lol.  Would u pls explain what is going on?

Author

Newoptionz

January 2023