Skip to content

Commit 41b3925

Browse files
committed
Minor fix
1 parent e10e378 commit 41b3925

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Algorithm/QCAlgorithm.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,10 @@ public Security AddSecurity(Symbol symbol, Resolution? resolution = null, bool f
20182018
continuousContractSymbol.ID.SecurityType,
20192019
security.Exchange.Hours);
20202020
AddUniverse(new ContinuousContractUniverse(security, continuousUniverseSettings, LiveMode,
2021-
new SubscriptionDataConfig(canonicalConfig, symbol: continuousContractSymbol, extendedHours: extendedMarketHours)));
2021+
new SubscriptionDataConfig(canonicalConfig, symbol: continuousContractSymbol,
2022+
// We can use any data type here, since we are not going to use the data.
2023+
// We just don't want to use the OptionUniverse type because it will force disable extended market hours
2024+
objectType: typeof(Tick), extendedHours: extendedMarketHours)));
20222025

20232026
universe = new FuturesChainUniverse((Future)security, settings);
20242027
}
@@ -2373,7 +2376,10 @@ public Option AddOptionContract(Symbol symbol, Resolution? resolution = null, bo
23732376
Resolution = underlyingConfigs.GetHighestResolution(),
23742377
ExtendedMarketHours = extendedMarketHours
23752378
};
2376-
universe = AddUniverse(new OptionContractUniverse(new SubscriptionDataConfig(configs.First(), symbol: universeSymbol, extendedHours: extendedMarketHours), settings));
2379+
universe = AddUniverse(new OptionContractUniverse(new SubscriptionDataConfig(configs.First(),
2380+
// We can use any data type here, since we are not going to use the data.
2381+
// We just don't want to use the OptionUniverse type because it will force disable extended market hours
2382+
symbol: universeSymbol, objectType: typeof(Tick), extendedHours: extendedMarketHours), settings));
23772383
}
23782384

23792385
// update the universe

Common/Data/SubscriptionDataConfig.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ public SubscriptionDataConfig(SubscriptionDataConfig config,
302302
PriceScaleFactor = config.PriceScaleFactor;
303303
SumOfDividends = config.SumOfDividends;
304304
Consolidators = config.Consolidators;
305-
ExtendedMarketHours = extendedHours ?? config.ExtendedMarketHours;
306305
}
307306

308307
/// <summary>

0 commit comments

Comments
 (0)