GetLastKnownPrices python data (#6191)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled

* Adding unit tests reproducing issue.

* Fix a couple of minor bugs

- IsMarketOpen will work correctly when used with daily and hourly
  resolution.
- slice.Get will work correctly with python custom data
- ExtendedDictionary will be able to dinamically access methods,
  required for python and private C# data types

* Refactor solution. Add more tests

* Remove unrequired import statement
This commit is contained in:
Martin-Molinero
2022-02-08 15:37:05 -03:00
committed by GitHub
parent b6815d22de
commit c8dc343c13
19 changed files with 356 additions and 57 deletions
@@ -50,6 +50,7 @@ class BasicTemplateFuturesDailyAlgorithm(QCAlgorithm):
front = sorted(contracts, key = lambda x: x.Expiry, reverse=True)[0]
self.contractSymbol = front.Symbol
self.MarketOrder(front.Symbol , 1)
if self.IsMarketOpen(self.contractSymbol):
self.MarketOrder(front.Symbol , 1)
else:
self.Liquidate()