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

A data csolidator that can make trade bars from DynamicData derived types. This is useful for aggregating Quandl and other highly flexible dynamic custom data types. More...

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

Public Member Functions

 DynamicDataConsolidator (TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the period. More...
 
 DynamicDataConsolidator (int maxCount)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data. More...
 
 DynamicDataConsolidator (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...
 
 DynamicDataConsolidator (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...
 

Protected Member Functions

override void AggregateBar (ref TradeBar workingBar, DynamicData 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< DynamicData >
 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< DynamicData >
TradeBar WorkingBar
 Gets a copy of the current 'workingBar'. More...
 

Detailed Description

A data csolidator that can make trade bars from DynamicData derived types. This is useful for aggregating Quandl and other highly flexible dynamic custom data types.

Definition at line 25 of file DynamicDataConsolidator.cs.

Constructor & Destructor Documentation

◆ DynamicDataConsolidator() [1/4]

QuantConnect.Data.Consolidators.DynamicDataConsolidator.DynamicDataConsolidator ( 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 31 of file DynamicDataConsolidator.cs.

◆ DynamicDataConsolidator() [2/4]

QuantConnect.Data.Consolidators.DynamicDataConsolidator.DynamicDataConsolidator ( 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 emiting a consolidated bar

Definition at line 40 of file DynamicDataConsolidator.cs.

◆ DynamicDataConsolidator() [3/4]

QuantConnect.Data.Consolidators.DynamicDataConsolidator.DynamicDataConsolidator ( 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 emiting a consolidated bar
periodThe minimum span of time before emitting a consolidated bar

Definition at line 50 of file DynamicDataConsolidator.cs.

◆ DynamicDataConsolidator() [4/4]

QuantConnect.Data.Consolidators.DynamicDataConsolidator.DynamicDataConsolidator ( 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.

Parameters
funcFunc that defines the start time of a consolidated data

Definition at line 59 of file DynamicDataConsolidator.cs.

Member Function Documentation

◆ AggregateBar()

override void QuantConnect.Data.Consolidators.DynamicDataConsolidator.AggregateBar ( ref TradeBar  workingBar,
DynamicData  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 70 of file DynamicDataConsolidator.cs.

Here is the call graph for this function:

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