Lean
$LEAN_TAG$
|
This consolidator can transform a stream of BaseData instances into a stream of RenkoBar with a constant volume for each bar. More...
Public Member Functions | |
VolumeRenkoConsolidator (decimal barSize) | |
Initializes a new instance of the VolumeRenkoConsolidator class using the specified barSize . More... | |
override void | Update (BaseData data) |
Updates this consolidator with the specified data 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... | |
Public Member Functions inherited from QuantConnect.Data.Consolidators.DataConsolidator< BaseData > | |
void | Update (IBaseData data) |
Updates this consolidator with the specified data More... | |
abstract void | Update (TInput data) |
Updates this consolidator with the specified data. This method is responsible for raising the DataConsolidated event More... | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
Public Attributes | |
override IBaseData | WorkingData => _currentBar |
Gets a clone of the data being currently consolidated More... | |
override Type | OutputType => typeof(VolumeRenkoBar) |
Gets VolumeRenkoBar which is the type emitted in the IDataConsolidator.DataConsolidated event. More... | |
Protected Member Functions | |
void | OnDataConsolidated (VolumeRenkoBar consolidated) |
Event invocator for the DataConsolidated event. This should be invoked by derived classes when they have consolidated a new piece of data. More... | |
Protected Member Functions inherited from QuantConnect.Data.Consolidators.DataConsolidator< BaseData > | |
virtual void | OnDataConsolidated (IBaseData consolidated) |
Event invocator for the DataConsolidated event. This should be invoked by derived classes when they have consolidated a new piece of data. More... | |
Events | |
new EventHandler< VolumeRenkoBar > | DataConsolidated |
Event handler that fires when a new piece of data is produced More... | |
Events inherited from QuantConnect.Data.Consolidators.DataConsolidator< BaseData > | |
DataConsolidatedHandler | DataConsolidated |
Event handler that fires when a new piece of data is produced More... | |
Additional Inherited Members | |
Properties inherited from QuantConnect.Data.Consolidators.DataConsolidator< BaseData > | |
IBaseData | Consolidated [get, protected set] |
Gets the most recently consolidated piece of data. This will be null if this consolidator has not produced any data yet. More... | |
abstract IBaseData | WorkingData [get] |
Gets a clone of the data being currently consolidated More... | |
Type | InputType [get] |
Gets the type consumed by this consolidator More... | |
abstract Type | OutputType [get] |
Gets the type produced by this consolidator More... | |
This consolidator can transform a stream of BaseData instances into a stream of RenkoBar with a constant volume for each bar.
Definition at line 25 of file VolumeRenkoConsolidator.cs.
QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.VolumeRenkoConsolidator | ( | decimal | barSize | ) |
Initializes a new instance of the VolumeRenkoConsolidator class using the specified barSize .
barSize | The constant volume size of each bar |
Definition at line 49 of file VolumeRenkoConsolidator.cs.
override void QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.Update | ( | BaseData | data | ) |
Updates this consolidator with the specified data
data | The new data for the consolidator |
Definition at line 58 of file VolumeRenkoConsolidator.cs.
|
virtual |
Scans this consolidator to see if it should emit a bar due to time passing
currentLocalTime | The current time in the local time zone (same as BaseData.Time) |
Implements QuantConnect.Data.Consolidators.DataConsolidator< BaseData >.
Definition at line 112 of file VolumeRenkoConsolidator.cs.
|
virtual |
Resets the consolidator
Reimplemented from QuantConnect.Data.Consolidators.DataConsolidator< BaseData >.
Definition at line 119 of file VolumeRenkoConsolidator.cs.
|
protected |
Event invocator for the DataConsolidated event. This should be invoked by derived classes when they have consolidated a new piece of data.
consolidated | The newly consolidated data |
Definition at line 130 of file VolumeRenkoConsolidator.cs.
override IBaseData QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.WorkingData => _currentBar |
Gets a clone of the data being currently consolidated
Definition at line 33 of file VolumeRenkoConsolidator.cs.
override Type QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.OutputType => typeof(VolumeRenkoBar) |
Gets VolumeRenkoBar which is the type emitted in the IDataConsolidator.DataConsolidated event.
Definition at line 38 of file VolumeRenkoConsolidator.cs.
new EventHandler<VolumeRenkoBar> QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.DataConsolidated |
Event handler that fires when a new piece of data is produced
Definition at line 43 of file VolumeRenkoConsolidator.cs.