Lean  $LEAN_TAG$
QuantConnect.BaseSeries Class Referenceabstract

Chart Series Object - Series data and properties for a chart: More...

Inheritance diagram for QuantConnect.BaseSeries:
[legend]

Public Member Functions

virtual void AddPoint (ISeriesPoint point)
 Add a new point to this series More...
 
abstract void AddPoint (DateTime time, List< decimal > values)
 Add a new point to this series More...
 
BaseSeries GetUpdates ()
 Get the updates since the last call to this function. More...
 
void Purge ()
 Removes the data from this series and resets the update position to 0 More...
 
abstract ISeriesPoint ConsolidateChartPoints ()
 Will sum up all chart points into a new single value, using the time of latest point More...
 
abstract BaseSeries Clone (bool empty=false)
 Return a new instance clone of this object More...
 
IEnumerable< T > GetValues< T > ()
 Returns an enumerable of the values of the series cast to the specified type More...
 

Static Public Member Functions

static BaseSeries Create (SeriesType seriesType, string name, int index=0, string unit="$")
 Creates a series according to the specified type. More...
 

Protected Member Functions

 BaseSeries ()
 Default constructor for chart series More...
 
 BaseSeries (string name, SeriesType type)
 Constructor method for Chart Series More...
 
 BaseSeries (string name, SeriesType type, int index)
 Foundational constructor on the series class More...
 
 BaseSeries (string name, SeriesType type, int index, string unit)
 Foundational constructor on the series class More...
 
 BaseSeries (string name, SeriesType type, string unit)
 Constructor method for Chart Series More...
 
List< ISeriesPointCloneValues ()
 Return a list of cloned values More...
 

Properties

string Name [get, set]
 Name of the series. More...
 
string Unit [get, set]
 Axis for the chart series. More...
 
int Index [get, set]
 Index/position of the series on the chart. More...
 
string IndexName [get, set]
 Axis name for the chart series. More...
 
int? ZIndex [get, set]
 Defines the visual Z index of the series on the chart. More...
 
SeriesType SeriesType [get, set]
 Chart type for the series: More...
 
string Tooltip [get, set]
 An optional tooltip template More...
 
List< ISeriesPointValues [get, set]
 The series list of values. These values are assumed to be in ascending time order (first points earliest, last points latest) More...
 

Detailed Description

Chart Series Object - Series data and properties for a chart:

Definition at line 29 of file BaseSeries.cs.

Constructor & Destructor Documentation

◆ BaseSeries() [1/5]

QuantConnect.BaseSeries.BaseSeries ( )
protected

Default constructor for chart series

Definition at line 81 of file BaseSeries.cs.

◆ BaseSeries() [2/5]

QuantConnect.BaseSeries.BaseSeries ( string  name,
SeriesType  type 
)
protected

Constructor method for Chart Series

Parameters
nameName of the chart series
typeType of the series

Definition at line 92 of file BaseSeries.cs.

◆ BaseSeries() [3/5]

QuantConnect.BaseSeries.BaseSeries ( string  name,
SeriesType  type,
int  index 
)
protected

Foundational constructor on the series class

Parameters
nameName of the series
typeType of the series
indexSeries index position on the chart

Definition at line 105 of file BaseSeries.cs.

◆ BaseSeries() [4/5]

QuantConnect.BaseSeries.BaseSeries ( string  name,
SeriesType  type,
int  index,
string  unit 
)
protected

Foundational constructor on the series class

Parameters
nameName of the series
typeType of the series
indexSeries index position on the chart
unitUnit for the series axis

Definition at line 118 of file BaseSeries.cs.

◆ BaseSeries() [5/5]

QuantConnect.BaseSeries.BaseSeries ( string  name,
SeriesType  type,
string  unit 
)
protected

Constructor method for Chart Series

Parameters
nameName of the chart series
typeType of the chart series
unitUnit of the series

Definition at line 130 of file BaseSeries.cs.

Member Function Documentation

◆ AddPoint() [1/2]

virtual void QuantConnect.BaseSeries.AddPoint ( ISeriesPoint  point)
virtual

Add a new point to this series

Parameters
pointThe data point to add

Reimplemented in QuantConnect.Series, and QuantConnect.CandlestickSeries.

Definition at line 139 of file BaseSeries.cs.

Here is the caller graph for this function:

◆ AddPoint() [2/2]

abstract void QuantConnect.BaseSeries.AddPoint ( DateTime  time,
List< decimal >  values 
)
pure virtual

Add a new point to this series

Parameters
timeThe time of the data point
valuesThe values of the data point

Implemented in QuantConnect.Series, and QuantConnect.CandlestickSeries.

◆ GetUpdates()

BaseSeries QuantConnect.BaseSeries.GetUpdates ( )

Get the updates since the last call to this function.

Returns
List of the updates from the series

Definition at line 163 of file BaseSeries.cs.

Here is the call graph for this function:

◆ Purge()

void QuantConnect.BaseSeries.Purge ( )

Removes the data from this series and resets the update position to 0

Definition at line 187 of file BaseSeries.cs.

◆ ConsolidateChartPoints()

abstract ISeriesPoint QuantConnect.BaseSeries.ConsolidateChartPoints ( )
pure virtual

Will sum up all chart points into a new single value, using the time of latest point

Returns
The new chart point

Implemented in QuantConnect.Series, and QuantConnect.CandlestickSeries.

Here is the caller graph for this function:

◆ Clone()

abstract BaseSeries QuantConnect.BaseSeries.Clone ( bool  empty = false)
pure virtual

Return a new instance clone of this object

Returns

Implemented in QuantConnect.Series, and QuantConnect.CandlestickSeries.

Here is the caller graph for this function:

◆ CloneValues()

List<ISeriesPoint> QuantConnect.BaseSeries.CloneValues ( )
protected

Return a list of cloned values

Returns

Definition at line 209 of file BaseSeries.cs.

Here is the caller graph for this function:

◆ GetValues< T >()

IEnumerable<T> QuantConnect.BaseSeries.GetValues< T > ( )

Returns an enumerable of the values of the series cast to the specified type

Returns
An enumerable of the values of the series cast to the specified type
Type Constraints
T :ISeriesPoint 

Definition at line 223 of file BaseSeries.cs.

◆ Create()

static BaseSeries QuantConnect.BaseSeries.Create ( SeriesType  seriesType,
string  name,
int  index = 0,
string  unit = "$" 
)
static

Creates a series according to the specified type.

Parameters
seriesTypeThe series type
nameThe name of the series
indexSeries index position on the chart
unitUnit for the series axis
Returns
A CandlestickSeries if seriesType is SeriesType.Candle. A Series otherwise.

Definition at line 240 of file BaseSeries.cs.

Here is the caller graph for this function:

Property Documentation

◆ Name

string QuantConnect.BaseSeries.Name
getset

Name of the series.

Definition at line 37 of file BaseSeries.cs.

◆ Unit

string QuantConnect.BaseSeries.Unit
getset

Axis for the chart series.

Definition at line 42 of file BaseSeries.cs.

◆ Index

int QuantConnect.BaseSeries.Index
getset

Index/position of the series on the chart.

Definition at line 47 of file BaseSeries.cs.

◆ IndexName

string QuantConnect.BaseSeries.IndexName
getset

Axis name for the chart series.

Definition at line 53 of file BaseSeries.cs.

◆ ZIndex

int? QuantConnect.BaseSeries.ZIndex
getset

Defines the visual Z index of the series on the chart.

Definition at line 59 of file BaseSeries.cs.

◆ SeriesType

SeriesType QuantConnect.BaseSeries.SeriesType
getset

Chart type for the series:

Definition at line 64 of file BaseSeries.cs.

◆ Tooltip

string QuantConnect.BaseSeries.Tooltip
getset

An optional tooltip template

Definition at line 70 of file BaseSeries.cs.

◆ Values

List<ISeriesPoint> QuantConnect.BaseSeries.Values
getset

The series list of values. These values are assumed to be in ascending time order (first points earliest, last points latest)

Definition at line 76 of file BaseSeries.cs.


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