Lean  $LEAN_TAG$
QuantConnect.Data.Consolidators.BaseDataConsolidator Class Reference

Type capable of consolidating trade bars from any base data instance More...

Inheritance diagram for QuantConnect.Data.Consolidators.BaseDataConsolidator:
[legend]

Public Member Functions

 BaseDataConsolidator (TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the period More...
 
 BaseDataConsolidator (int maxCount)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data More...
 
 BaseDataConsolidator (int maxCount, TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More...
 
 BaseDataConsolidator (Func< DateTime, CalendarInfo > func)
 Initializes a new instance of the BaseDataConsolidator class More...
 
 BaseDataConsolidator (PyObject pyfuncobj)
 Initializes a new instance of the BaseDataConsolidator class More...
 

Static Public Member Functions

static BaseDataConsolidator FromResolution (Resolution resolution)
 Create a new TickConsolidator for the desired resolution More...
 

Protected Member Functions

override void AggregateBar (ref TradeBar workingBar, BaseData data)
 Aggregates the new 'data' into the 'workingBar'. The 'workingBar' will be null following the event firing More...
 
- Protected Member Functions inherited from QuantConnect.Data.Consolidators.TradeBarConsolidatorBase< BaseData >
 TradeBarConsolidatorBase (TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the period More...
 
 TradeBarConsolidatorBase (int maxCount)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data More...
 
 TradeBarConsolidatorBase (int maxCount, TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More...
 
 TradeBarConsolidatorBase (Func< DateTime, CalendarInfo > func)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More...
 
 TradeBarConsolidatorBase (PyObject pyfuncobj)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More...
 

Additional Inherited Members

- Public Attributes inherited from QuantConnect.Data.Consolidators.TradeBarConsolidatorBase< BaseData >
TradeBar WorkingBar
 Gets a copy of the current 'workingBar'. More...
 

Detailed Description

Type capable of consolidating trade bars from any base data instance

Definition at line 25 of file BaseDataConsolidator.cs.

Constructor & Destructor Documentation

◆ BaseDataConsolidator() [1/5]

QuantConnect.Data.Consolidators.BaseDataConsolidator.BaseDataConsolidator ( TimeSpan  period)

Creates a consolidator to produce a new 'TradeBar' representing the period

Parameters
periodThe minimum span of time before emitting a consolidated bar

Definition at line 41 of file BaseDataConsolidator.cs.

Here is the caller graph for this function:

◆ BaseDataConsolidator() [2/5]

QuantConnect.Data.Consolidators.BaseDataConsolidator.BaseDataConsolidator ( int  maxCount)

Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data

Parameters
maxCountThe number of pieces to accept before emitting a consolidated bar

Definition at line 50 of file BaseDataConsolidator.cs.

◆ BaseDataConsolidator() [3/5]

QuantConnect.Data.Consolidators.BaseDataConsolidator.BaseDataConsolidator ( int  maxCount,
TimeSpan  period 
)

Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first

Parameters
maxCountThe number of pieces to accept before emitting a consolidated bar
periodThe minimum span of time before emitting a consolidated bar

Definition at line 60 of file BaseDataConsolidator.cs.

◆ BaseDataConsolidator() [4/5]

QuantConnect.Data.Consolidators.BaseDataConsolidator.BaseDataConsolidator ( Func< DateTime, CalendarInfo func)

Initializes a new instance of the BaseDataConsolidator class

Parameters
funcFunc that defines the start time of a consolidated data

Definition at line 69 of file BaseDataConsolidator.cs.

◆ BaseDataConsolidator() [5/5]

QuantConnect.Data.Consolidators.BaseDataConsolidator.BaseDataConsolidator ( PyObject  pyfuncobj)

Initializes a new instance of the BaseDataConsolidator class

Parameters
pyfuncobjFunc that defines the start time of a consolidated data

Definition at line 79 of file BaseDataConsolidator.cs.

Member Function Documentation

◆ FromResolution()

static BaseDataConsolidator QuantConnect.Data.Consolidators.BaseDataConsolidator.FromResolution ( Resolution  resolution)
static

Create a new TickConsolidator for the desired resolution

Parameters
resolutionThe resolution desired
Returns
A consolidator that produces data on the resolution interval

Definition at line 32 of file BaseDataConsolidator.cs.

Here is the call graph for this function:

◆ AggregateBar()

override void QuantConnect.Data.Consolidators.BaseDataConsolidator.AggregateBar ( ref TradeBar  workingBar,
BaseData  data 
)
protected

Aggregates the new 'data' into the 'workingBar'. The 'workingBar' will be null following the event firing

Parameters
workingBarThe bar we're building, null if the event was just fired and we're starting a new trade bar
dataThe new data

Definition at line 90 of file BaseDataConsolidator.cs.


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