Hi! Sorry if this is a stupid question but i'm using the`FutureUniverseSelectionModel` to manually update indicators based on the current front month. This was working when I was using automatic indicator updates, but since I wanted to update indicators manually based on TradeBars from the current front month this problem came up. 

I'm facing an issue where i'm expecting to see `OnData` fire every minute, but it seems to come only twice a day (one at the open and one at the close). In the attached algo i'm writing a self.Debug where I'm expecting the minutely data to come through, am I missing something?? Thanks!

Here is an example of the output

314 | 20:20:23: 2010-01-04 16:15:00

315 | 20:20:23: 2010-01-04 17:00:00

316 | 20:20:23: 2010-01-05 16:15:00

317 | 20:20:23: 2010-01-05 17:00:00

318 | 20:20:24: 2010-01-06 16:15:00

319 | 20:20:24: 2010-01-06 17:00:00

320 | 20:20:25: 2010-01-07 16:15:00

import math from datetime import date, timedelta import numpy as np from Selection.FutureUniverseSelectionModel import FutureUniverseSelectionModel FUTURES = [ Futures.Indices.SP500EMini ] class FuturesUniverseSelectionModel(FutureUniverseSelectionModel): def __init__(self, select_future_chain_symbols): super().__init__(timedelta(1), select_future_chain_symbols) def Filter(self, filter): return (filter.FrontMonth()) class Security: def __init__(self, security): self.Security = security @property def Symbol(self): return self.Security.Symbol class TurtleSystemAlgo(QCAlgorithm): def Initialize(self): self.SetStartDate(2010, 1, 1) self.SetCash(100000) self.resolution = Resolution.Minute self.UniverseSettings.Resolution = self.resolution self.SetUniverseSelection(FuturesUniverseSelectionModel(self._select_futures_symbols)) self.symbol_data = {} def _select_futures_symbols(self, utcTime): return [ Symbol.Create(ticker, SecurityType.Future, Market.USA) for ticker in FUTURES ] def _init_symbol(self, security): self.AddSecurity(SecurityType.Future, security.Symbol, self.resolution) s = Security(security) self.symbol_data[security.Symbol.Value[:2]] = s def OnOrderEvent(self, order): if order.Status == OrderStatus.Filled: self._plot(order.Symbol, 'Buy' if order.FillQuantity > 0 else 'Sell', order.FillPrice) def OnSecuritiesChanged(self, changes): for security in changes.AddedSecurities: s = self.symbol_data.get(security.Symbol.Value[:2]) if not s: self._init_symbol(security) def OnData(self, data): for s, security in self.symbol_data.items(): symbol = security.Symbol if symbol not in data.Keys or not data[symbol]: continue try: prc = data[symbol].Price except: continue self.Debug(data[symbol].EndTime)

 

Author