@@ -4237,23 +4237,23 @@ private IDataConsolidator CreateConsolidator(Symbol symbol, Func<DateTime, Calen
42374237 {
42384238 if ( resolution . HasValue )
42394239 {
4240- if ( subscription . ExtendedMarketHours && ! Settings . DailyConsolidationUseExtendedMarketHours )
4240+ if ( resolution . Value == Resolution . Daily )
42414241 {
4242- // Show this warning only once
4243- if ( ! _hasShownDailyConsolidationWarning )
4242+ if ( subscription . ExtendedMarketHours && ! Settings . DailyConsolidationUseExtendedMarketHours )
42444243 {
4245- Debug ( $ "Warning: The subscription for { symbol } has ExtendedMarketHours=true, " +
4246- $ "but Settings.DailyConsolidationUseExtendedMarketHours=false. " +
4247- $ "Daily consolidations will exclude extended market hours. " +
4248- $ "Enable algorithm.Settings.DailyConsolidationUseExtendedMarketHours to include them."
4249- ) ;
4250-
4251- _hasShownDailyConsolidationWarning = true ;
4244+ // Show this warning only once
4245+ if ( ! _hasShownDailyConsolidationWarning )
4246+ {
4247+ Debug ( $ "Warning: The subscription for { symbol } has ExtendedMarketHours=true, " +
4248+ $ "but Settings.DailyConsolidationUseExtendedMarketHours=false. " +
4249+ $ "Daily consolidations will exclude extended market hours. " +
4250+ $ "Enable algorithm.Settings.DailyConsolidationUseExtendedMarketHours to include them."
4251+ ) ;
4252+
4253+ _hasShownDailyConsolidationWarning = true ;
4254+ }
42524255 }
4253- }
42544256
4255- if ( resolution . Value == Resolution . Daily )
4256- {
42574257 consolidator = new MarketHourAwareConsolidator ( Settings . DailyPreciseEndTime , resolution . Value , subscription . Type , subscription . TickType ,
42584258 Settings . DailyConsolidationUseExtendedMarketHours && subscription . ExtendedMarketHours ) ;
42594259 }
0 commit comments