Lean
$LEAN_TAG$
|
A data consolidator that can make bigger bars from any base data More...
Public Attributes | |
TradeBar | WorkingBar => (TradeBar) WorkingData |
Gets a copy of the current 'workingBar'. More... | |
![]() | |
override Type | OutputType |
Gets the type produced by this consolidator More... | |
override IBaseData | WorkingData |
Gets a clone of the data being currently consolidated More... | |
Protected Member Functions | |
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... | |
![]() | |
PeriodCountConsolidatorBase (TimeSpan period) | |
Creates a consolidator to produce a new TConsolidated instance representing the period More... | |
PeriodCountConsolidatorBase (int maxCount) | |
Creates a consolidator to produce a new TConsolidated instance representing the last count pieces of data More... | |
PeriodCountConsolidatorBase (int maxCount, TimeSpan period) | |
Creates a consolidator to produce a new TConsolidated instance representing the last count pieces of data or the period, whichever comes first More... | |
PeriodCountConsolidatorBase (Func< DateTime, CalendarInfo > func) | |
Creates a consolidator to produce a new TConsolidated instance representing the last count pieces of data or the period, whichever comes first More... | |
PeriodCountConsolidatorBase (PyObject pyObject) | |
Creates a consolidator to produce a new TConsolidated instance representing the last count pieces of data or the period, whichever comes first More... | |
virtual bool | ShouldProcess (T data) |
Determines whether or not the specified data should be processed More... | |
abstract void | AggregateBar (ref TConsolidated workingBar, T data) |
Aggregates the new 'data' into the 'workingBar'. The 'workingBar' will be null following the event firing More... | |
DateTime | GetRoundedBarTime (DateTime time) |
Gets a rounded-down bar time. Called by AggregateBar in derived classes. More... | |
DateTime | GetRoundedBarTime (IBaseData inputData) |
Gets a rounded-down bar start time. Called by AggregateBar in derived classes. More... | |
virtual void | OnDataConsolidated (TConsolidated e) |
Event invocator for the DataConsolidated event More... | |
Additional Inherited Members | |
![]() | |
override void | Update (T data) |
Updates this consolidator with the specified data. This method is responsible for raising the DataConsolidated event In time span mode, the bar range is closed on the left and open on the right: [T, T+TimeSpan). For example, if time span is 1 minute, we have [10:00, 10:01): so data at 10:01 is not included in the bar starting at 10:00. More... | |
override void | Scan (DateTime currentLocalTime) |
Scans this consolidator to see if it should emit a bar due to time passing More... | |
override void | Reset () |
Resets the consolidator More... | |
![]() | |
bool | IsTimeBased |
Returns true if this consolidator is time-based, false otherwise More... | |
TimeSpan? | Period |
Gets the time period for this consolidator More... | |
![]() | |
new EventHandler< TConsolidated > | DataConsolidated |
Event handler that fires when a new piece of data is produced. We define this as a 'new' event so we can expose it as a TConsolidated instead of a BaseData instance More... | |
A data consolidator that can make bigger bars from any base data
This type acts as the base for other consolidators that produce bars on a given time step or for a count of data.
T | The input type into the consolidator's Update method |
T | : | IBaseData |
Definition at line 29 of file TradeBarConsolidatorBase.cs.
|
protected |
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 36 of file TradeBarConsolidatorBase.cs.
|
protected |
Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data
maxCount | The number of pieces to accept before emiting a consolidated bar |
Definition at line 45 of file TradeBarConsolidatorBase.cs.
|
protected |
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 emiting a consolidated bar |
period | The minimum span of time before emitting a consolidated bar |
Definition at line 55 of file TradeBarConsolidatorBase.cs.
|
protected |
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 64 of file TradeBarConsolidatorBase.cs.
|
protected |
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 73 of file TradeBarConsolidatorBase.cs.
TradeBar QuantConnect.Data.Consolidators.TradeBarConsolidatorBase< T >.WorkingBar => (TradeBar) WorkingData |
Gets a copy of the current 'workingBar'.
Definition at line 81 of file TradeBarConsolidatorBase.cs.