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

A data consolidator that can make bigger bars from ticks over a given time span or a count of pieces of data. More...

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

Public Member Functions

 TickConsolidator (TimeSpan period)
 Creates a consolidator to produce a new 'TradeBar' representing the period More...
 
 TickConsolidator (int maxCount)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data More...
 
 TickConsolidator (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...
 
 TickConsolidator (Func< DateTime, CalendarInfo > func)
 Initializes a new instance of the TickQuoteBarConsolidator class More...
 
 TickConsolidator (PyObject pyfuncobj)
 Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first More...
 

Protected Member Functions

override bool ShouldProcess (Tick data)
 Determines whether or not the specified data should be processed More...
 
override void AggregateBar (ref TradeBar 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.TradeBarConsolidatorBase< Tick >
 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< Tick >
TradeBar WorkingBar
 Gets a copy of the current 'workingBar'. More...
 

Detailed Description

A data consolidator that can make bigger bars from ticks over a given time span or a count of pieces of data.

Definition at line 26 of file TickConsolidator.cs.

Constructor & Destructor Documentation

◆ TickConsolidator() [1/5]

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

Creates a consolidator to produce a new 'TradeBar' representing the period

Parameters
periodThe minimum span of time before emitting a consolidated bar

Definition at line 32 of file TickConsolidator.cs.

◆ TickConsolidator() [2/5]

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

Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data

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

Definition at line 41 of file TickConsolidator.cs.

◆ TickConsolidator() [3/5]

QuantConnect.Data.Consolidators.TickConsolidator.TickConsolidator ( 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

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 TickConsolidator.cs.

◆ TickConsolidator() [4/5]

QuantConnect.Data.Consolidators.TickConsolidator.TickConsolidator ( 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 TickConsolidator.cs.

◆ TickConsolidator() [5/5]

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

Creates a consolidator to produce a new 'TradeBar' representing the last count pieces of data or the period, whichever comes first

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

Definition at line 69 of file TickConsolidator.cs.

Member Function Documentation

◆ ShouldProcess()

override bool QuantConnect.Data.Consolidators.TickConsolidator.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 TickConsolidator.cs.

◆ AggregateBar()

override void QuantConnect.Data.Consolidators.TickConsolidator.AggregateBar ( ref TradeBar  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
dataThe new data

Definition at line 90 of file TickConsolidator.cs.


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