Lean
$LEAN_TAG$
|
A data consolidator that can make bigger bars from smaller ones over a given time span or a count of pieces of data. More...
Public Member Functions | |
TradeBarConsolidator (TimeSpan period) | |
Creates a consolidator to produce a new 'TradeBar' representing the period More... | |
TradeBarConsolidator (int maxCount) | |
Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data More... | |
TradeBarConsolidator (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... | |
TradeBarConsolidator (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... | |
TradeBarConsolidator (PyObject pyfuncobj) | |
Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More... | |
Static Public Member Functions | |
static TradeBarConsolidator | FromResolution (Resolution resolution) |
Create a new TradeBarConsolidator for the desired resolution More... | |
Protected Member Functions | |
override void | AggregateBar (ref TradeBar workingBar, TradeBar 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< TradeBar > | |
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< TradeBar > | |
TradeBar | WorkingBar |
Gets a copy of the current 'workingBar'. More... | |
A data consolidator that can make bigger bars from smaller ones over a given time span or a count of pieces of data.
Use this consolidator to turn data of a lower resolution into data of a higher resolution, for example, if you subscribe to minute data but want to have a 15 minute bar.
Definition at line 30 of file TradeBarConsolidator.cs.
QuantConnect.Data.Consolidators.TradeBarConsolidator.TradeBarConsolidator | ( | TimeSpan | period | ) |
Creates a consolidator to produce a new 'TradeBar' representing the period
period | The minimum span of time before emitting a consolidated bar |
Definition at line 46 of file TradeBarConsolidator.cs.
QuantConnect.Data.Consolidators.TradeBarConsolidator.TradeBarConsolidator | ( | int | maxCount | ) |
Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data
maxCount | The number of pieces to accept before emitting a consolidated bar |
Definition at line 55 of file TradeBarConsolidator.cs.
QuantConnect.Data.Consolidators.TradeBarConsolidator.TradeBarConsolidator | ( | 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
maxCount | The number of pieces to accept before emitting a consolidated bar |
period | The minimum span of time before emitting a consolidated bar |
Definition at line 65 of file TradeBarConsolidator.cs.
QuantConnect.Data.Consolidators.TradeBarConsolidator.TradeBarConsolidator | ( | 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
func | Func that defines the start time of a consolidated data |
Definition at line 74 of file TradeBarConsolidator.cs.
QuantConnect.Data.Consolidators.TradeBarConsolidator.TradeBarConsolidator | ( | PyObject | pyfuncobj | ) |
Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first
pyfuncobj | Python function object that defines the start time of a consolidated data |
Definition at line 83 of file TradeBarConsolidator.cs.
|
static |
Create a new TradeBarConsolidator for the desired resolution
resolution | The resolution desired |
Definition at line 37 of file TradeBarConsolidator.cs.
|
protected |
Aggregates the new 'data' into the 'workingBar'. The 'workingBar' will be null following the event firing
workingBar | The bar we're building, null if the event was just fired and we're starting a new trade bar |
data | The new data |
Definition at line 94 of file TradeBarConsolidator.cs.