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

Consolidates ticks into quote bars. This consolidator ignores trade ticks More...

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

Public Member Functions

 TickQuoteBarConsolidator (TimeSpan period)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
 TickQuoteBarConsolidator (int maxCount)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
 TickQuoteBarConsolidator (int maxCount, TimeSpan period)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
 TickQuoteBarConsolidator (Func< DateTime, CalendarInfo > func)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
 TickQuoteBarConsolidator (PyObject pyfuncobj)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
- Public Member Functions inherited from QuantConnect.Data.Consolidators.PeriodCountConsolidatorBase< Tick, QuoteBar >
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...
 

Protected Member Functions

override bool ShouldProcess (Tick data)
 Determines whether or not the specified data should be processed More...
 
override void AggregateBar (ref QuoteBar workingBar, Tick 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.PeriodCountConsolidatorBase< Tick, QuoteBar >
 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

- Public Attributes inherited from QuantConnect.Data.Consolidators.PeriodCountConsolidatorBase< Tick, QuoteBar >
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 Attributes inherited from QuantConnect.Data.Consolidators.PeriodCountConsolidatorBase< Tick, QuoteBar >
bool IsTimeBased
 Returns true if this consolidator is time-based, false otherwise More...
 
TimeSpan? Period
 Gets the time period for this consolidator More...
 
- Events inherited from QuantConnect.Data.Consolidators.PeriodCountConsolidatorBase< Tick, QuoteBar >
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...
 

Detailed Description

Consolidates ticks into quote bars. This consolidator ignores trade ticks

Definition at line 26 of file TickQuoteBarConsolidator.cs.

Constructor & Destructor Documentation

◆ TickQuoteBarConsolidator() [1/5]

QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.TickQuoteBarConsolidator ( TimeSpan  period)

Initializes a new instance of the TickQuoteBarConsolidator class

Parameters
periodThe minimum span of time before emitting a consolidated bar

Definition at line 32 of file TickQuoteBarConsolidator.cs.

◆ TickQuoteBarConsolidator() [2/5]

QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.TickQuoteBarConsolidator ( int  maxCount)

Initializes a new instance of the TickQuoteBarConsolidator class

Parameters
maxCountThe number of pieces to accept before emitting a consolidated bar

Definition at line 41 of file TickQuoteBarConsolidator.cs.

◆ TickQuoteBarConsolidator() [3/5]

QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.TickQuoteBarConsolidator ( int  maxCount,
TimeSpan  period 
)

Initializes a new instance of the TickQuoteBarConsolidator class

Parameters
maxCountThe number of pieces to accept before emitting a consolidated bar
periodThe minimum span of time before emitting a consolidated bar

Definition at line 51 of file TickQuoteBarConsolidator.cs.

◆ TickQuoteBarConsolidator() [4/5]

QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.TickQuoteBarConsolidator ( Func< DateTime, CalendarInfo func)

Initializes a new instance of the TickQuoteBarConsolidator class

Parameters
funcFunc that defines the start time of a consolidated data

Definition at line 60 of file TickQuoteBarConsolidator.cs.

◆ TickQuoteBarConsolidator() [5/5]

QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.TickQuoteBarConsolidator ( PyObject  pyfuncobj)

Initializes a new instance of the TickQuoteBarConsolidator class

Parameters
pyfuncobjPython function object that defines the start time of a consolidated data

Definition at line 69 of file TickQuoteBarConsolidator.cs.

Member Function Documentation

◆ ShouldProcess()

override bool QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.ShouldProcess ( Tick  data)
protected

Determines whether or not the specified data should be processed

Parameters
dataThe data to check
Returns
True if the consolidator should process this data, false otherwise

Definition at line 79 of file TickQuoteBarConsolidator.cs.

◆ AggregateBar()

override void QuantConnect.Data.Consolidators.TickQuoteBarConsolidator.AggregateBar ( ref QuoteBar  workingBar,
Tick  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 consolidated bar
dataThe new data

Definition at line 90 of file TickQuoteBarConsolidator.cs.

Here is the call graph for this function:

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