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:
@@ -57,7 +57,7 @@ class BasicTemplateOptionsHourlyAlgorithm(QCAlgorithm):
|
||||
key = lambda x: x.Right, reverse=True)
|
||||
|
||||
# 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)
|
||||
self.MarketOnCloseOrder(symbol, -1)
|
||||
|
||||
Reference in New Issue
Block a user