GetLastKnownPrices python data (#6191)
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user