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

This consolidator can transform a stream of BaseData instances into a stream of RenkoBar with a constant volume for each bar. More...

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

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< VolumeRenkoBarDataConsolidated
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ VolumeRenkoConsolidator()

QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.VolumeRenkoConsolidator ( decimal  barSize)

Initializes a new instance of the VolumeRenkoConsolidator class using the specified barSize .

Parameters
barSizeThe constant volume size of each bar

Definition at line 49 of file VolumeRenkoConsolidator.cs.

Member Function Documentation

◆ Update()

override void QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.Update ( BaseData  data)

Updates this consolidator with the specified data

Parameters
dataThe new data for the consolidator

Definition at line 58 of file VolumeRenkoConsolidator.cs.

Here is the call graph for this function:

◆ Scan()

override void QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.Scan ( DateTime  currentLocalTime)
virtual

Scans this consolidator to see if it should emit a bar due to time passing

Parameters
currentLocalTimeThe 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.

◆ Reset()

override void QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.Reset ( )
virtual

Resets the consolidator

Reimplemented from QuantConnect.Data.Consolidators.DataConsolidator< BaseData >.

Definition at line 119 of file VolumeRenkoConsolidator.cs.

◆ OnDataConsolidated()

void QuantConnect.Data.Consolidators.VolumeRenkoConsolidator.OnDataConsolidated ( VolumeRenkoBar  consolidated)
protected

Event invocator for the DataConsolidated event. This should be invoked by derived classes when they have consolidated a new piece of data.

Parameters
consolidatedThe newly consolidated data

Definition at line 130 of file VolumeRenkoConsolidator.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ WorkingData

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.

◆ OutputType

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.

Event Documentation

◆ DataConsolidated

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.


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