Lean  $LEAN_TAG$
QuantConnect.Data.Common.MarketHourAwareConsolidator Class Reference

Consolidator for open markets bar only, extended hours bar are not consolidated. More...

Inheritance diagram for QuantConnect.Data.Common.MarketHourAwareConsolidator:
[legend]

Public Member Functions

 MarketHourAwareConsolidator (bool dailyStrictEndTimeEnabled, Resolution resolution, Type dataType, TickType tickType, bool extendedMarketHours)
 Initializes a new instance of the MarketHourAwareConsolidator class. More...
 
virtual void Update (IBaseData data)
 Updates this consolidator with the specified data More...
 
void Scan (DateTime currentLocalTime)
 Scans this consolidator to see if it should emit a bar due to time passing More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Reset ()
 Resets the consolidator More...
 

Public Attributes

IBaseData Consolidated => Consolidator.Consolidated
 Gets the most recently consolidated piece of data. This will be null if this consolidator has not produced any data yet. More...
 
Type InputType => Consolidator.InputType
 Gets the type consumed by this consolidator More...
 
IBaseData WorkingData => Consolidator.WorkingData
 Gets a clone of the data being currently consolidated More...
 
Type OutputType => Consolidator.OutputType
 Gets the type produced by this consolidator More...
 

Protected Member Functions

void Initialize (IBaseData data)
 Perform late initialization based on the datas symbol More...
 
virtual CalendarInfo DailyStrictEndTime (DateTime dateTime)
 Determines a bar start time and period More...
 
virtual bool UseStrictEndTime (Symbol symbol)
 Useful for testing More...
 
virtual void ForwardConsolidatedBar (object sender, IBaseData consolidated)
 Will forward the underlying consolidated bar to consumers on this object More...
 

Properties

TimeSpan Period [get]
 The consolidation period requested More...
 
IDataConsolidator Consolidator [get]
 The consolidator instance More...
 
SecurityExchangeHours ExchangeHours [get, set]
 The associated security exchange hours instance More...
 
DateTimeZone DataTimeZone [get, set]
 The associated data time zone More...
 
- Properties inherited from QuantConnect.Data.Consolidators.IDataConsolidator
IBaseData Consolidated [get]
 Gets the most recently consolidated piece of data. This will be null if this consolidator has not produced any data yet. More...
 
IBaseData WorkingData [get]
 Gets a clone of the data being currently consolidated More...
 
Type InputType [get]
 Gets the type consumed by this consolidator More...
 
Type OutputType [get]
 Gets the type produced by this consolidator More...
 

Events

DataConsolidatedHandler DataConsolidated
 Event handler that fires when a new piece of data is produced More...
 
- Events inherited from QuantConnect.Data.Consolidators.IDataConsolidator
DataConsolidatedHandler DataConsolidated
 Event handler that fires when a new piece of data is produced More...
 

Detailed Description

Consolidator for open markets bar only, extended hours bar are not consolidated.

Definition at line 28 of file MarketHourAwareConsolidator.cs.

Constructor & Destructor Documentation

◆ MarketHourAwareConsolidator()

QuantConnect.Data.Common.MarketHourAwareConsolidator.MarketHourAwareConsolidator ( bool  dailyStrictEndTimeEnabled,
Resolution  resolution,
Type  dataType,
TickType  tickType,
bool  extendedMarketHours 
)

Initializes a new instance of the MarketHourAwareConsolidator class.

Parameters
resolutionThe resolution.
dataTypeThe target data type
tickTypeThe target tick type
extendedMarketHoursTrue if extended market hours should be consolidated

Definition at line 82 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:

Member Function Documentation

◆ Update()

virtual void QuantConnect.Data.Common.MarketHourAwareConsolidator.Update ( IBaseData  data)
virtual

Updates this consolidator with the specified data

Parameters
dataThe new data for the consolidator

Implements QuantConnect.Data.Consolidators.IDataConsolidator.

Definition at line 131 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:

◆ Scan()

void QuantConnect.Data.Common.MarketHourAwareConsolidator.Scan ( DateTime  currentLocalTime)

Scans this consolidator to see if it should emit a bar due to time passing

Parameters
currentLocalTimeThe current time in the local time zone (same as P:QuantConnect.Data.BaseData.Time)

Implements QuantConnect.Data.Consolidators.IDataConsolidator.

Definition at line 150 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:

◆ Dispose()

void QuantConnect.Data.Common.MarketHourAwareConsolidator.Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Definition at line 158 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:

◆ Reset()

void QuantConnect.Data.Common.MarketHourAwareConsolidator.Reset ( )

Resets the consolidator

Implements QuantConnect.Data.Consolidators.IDataConsolidator.

Definition at line 167 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:

◆ Initialize()

void QuantConnect.Data.Common.MarketHourAwareConsolidator.Initialize ( IBaseData  data)
protected

Perform late initialization based on the datas symbol

Definition at line 178 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DailyStrictEndTime()

virtual CalendarInfo QuantConnect.Data.Common.MarketHourAwareConsolidator.DailyStrictEndTime ( DateTime  dateTime)
protectedvirtual

Determines a bar start time and period

Definition at line 194 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UseStrictEndTime()

virtual bool QuantConnect.Data.Common.MarketHourAwareConsolidator.UseStrictEndTime ( Symbol  symbol)
protectedvirtual

Useful for testing

Definition at line 206 of file MarketHourAwareConsolidator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ForwardConsolidatedBar()

virtual void QuantConnect.Data.Common.MarketHourAwareConsolidator.ForwardConsolidatedBar ( object  sender,
IBaseData  consolidated 
)
protectedvirtual

Will forward the underlying consolidated bar to consumers on this object

Definition at line 214 of file MarketHourAwareConsolidator.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ Consolidated

IBaseData QuantConnect.Data.Common.MarketHourAwareConsolidator.Consolidated => Consolidator.Consolidated

Gets the most recently consolidated piece of data. This will be null if this consolidator has not produced any data yet.

Definition at line 58 of file MarketHourAwareConsolidator.cs.

◆ InputType

Type QuantConnect.Data.Common.MarketHourAwareConsolidator.InputType => Consolidator.InputType

Gets the type consumed by this consolidator

Definition at line 63 of file MarketHourAwareConsolidator.cs.

◆ WorkingData

IBaseData QuantConnect.Data.Common.MarketHourAwareConsolidator.WorkingData => Consolidator.WorkingData

Gets a clone of the data being currently consolidated

Definition at line 68 of file MarketHourAwareConsolidator.cs.

◆ OutputType

Type QuantConnect.Data.Common.MarketHourAwareConsolidator.OutputType => Consolidator.OutputType

Gets the type produced by this consolidator

Definition at line 73 of file MarketHourAwareConsolidator.cs.

Property Documentation

◆ Period

TimeSpan QuantConnect.Data.Common.MarketHourAwareConsolidator.Period
getprotected

The consolidation period requested

Definition at line 37 of file MarketHourAwareConsolidator.cs.

◆ Consolidator

IDataConsolidator QuantConnect.Data.Common.MarketHourAwareConsolidator.Consolidator
getprotected

The consolidator instance

Definition at line 42 of file MarketHourAwareConsolidator.cs.

◆ ExchangeHours

SecurityExchangeHours QuantConnect.Data.Common.MarketHourAwareConsolidator.ExchangeHours
getsetprotected

The associated security exchange hours instance

Definition at line 47 of file MarketHourAwareConsolidator.cs.

◆ DataTimeZone

DateTimeZone QuantConnect.Data.Common.MarketHourAwareConsolidator.DataTimeZone
getsetprotected

The associated data time zone

Definition at line 52 of file MarketHourAwareConsolidator.cs.

Event Documentation

◆ DataConsolidated

DataConsolidatedHandler QuantConnect.Data.Common.MarketHourAwareConsolidator.DataConsolidated

Event handler that fires when a new piece of data is produced

Definition at line 125 of file MarketHourAwareConsolidator.cs.


The documentation for this class was generated from the following file: