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
@@ -51,7 +51,7 @@ class BasicTemplateOptionsDailyAlgorithm(QCAlgorithm):
contracts = sorted(chain, key = lambda x: x.Expiry)
# if found, trade it
if len(contracts) == 0: return
if len(contracts) == 0 or not self.IsMarketOpen(contracts[0].Symbol): return
symbol = contracts[0].Symbol
self.MarketOrder(symbol, 1)