I need to do some calculation once the warmpup period is finished. To get the list of securities I use self.GetWarmupHistoryRequests() in OnWarmupFinished() method.

But I end up with different secutirties that I originally added.

  1. # region imports
  2. from AlgorithmImports import *
  3. # endregion
  4. class GeekyLightBrownOwl(QCAlgorithm):
  5. def Initialize(self):
  6. self.SetTimeZone("UTC")
  7. self.SetStartDate(2022, 1, 2)
  8. self.SetEndDate(2022, 1, 4)
  9. self.SetAccountCurrency("BUSD")
  10. self.SetCash("BUSD", 100_000.00)
  11. self.SetBrokerageModel(BrokerageName.Binance, AccountType.Margin)
  12. for s in ["AVABUSD", "BNBBUSD"]:
  13. self.AddCrypto(s, Resolution.Minute)
  14. self.SetWarmUp(5)
  15. def OnWarmupFinished(self):
  16. slices = self.History(self.GetWarmupHistoryRequests())
  17. for s in slices:
  18. for v in s.Values:
  19. self.Debug(v)
+ Expand

In the log file, I'm getting 2 other securities which were not added in the algorithm.

BNBBUSD: O: 527.3 H: 527.6 L: 527 C: 527.3 V: 195.646AVABUSD: O: 1.863 H: 1.863 L: 1.863 C: 1.863 V: 0USDCBUSD 18N: O: 1 H: 1 L: 1 C: 1 V: 30661.61BTCBUSD 18N: O: 47691.18 H: 47772.5 L: 47660.92 C: 47732.53 V: 26.26728

any help would be much appreciated,

thank you

Author

Milad Resketi

April 2022