Lean  $LEAN_TAG$
QuantConnect.Indicators.PivotPointsHighLow Class Reference

Pivot Points (High/Low), also known as Bar Count Reversals, indicator. https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/pivot-points-high-low More...

Inheritance diagram for QuantConnect.Indicators.PivotPointsHighLow:
[legend]

Public Member Functions

 PivotPointsHighLow (int surroundingBarsCount, int lastStoredValues=100)
 Creates a new instance of PivotPointsHighLow indicator with an equal high and low length More...
 
 PivotPointsHighLow (int surroundingBarsCountForHighPoint, int surroundingBarsCountForLowPoint, int lastStoredValues=100)
 Creates a new instance of PivotPointsHighLow indicator More...
 
 PivotPointsHighLow (string name, int surroundingBarsCountForHighPoint, int surroundingBarsCountForLowPoint, int lastStoredValues=100)
 Creates a new instance of PivotPointsHighLow indicator More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 
PivotPoint[] GetHighPivotPointsArray ()
 Get current high pivot points, in the order such that first element in collection is the nearest to the present date More...
 
PivotPoint[] GetLowPivotPointsArray ()
 Get current low pivot points, in the order such that first element in collection is the nearest to the present date More...
 
PivotPoint[] GetAllPivotPointsArray ()
 Get all pivot points, in the order such that first element in collection is the nearest to the present date More...
 

Public Attributes

override bool IsReady => _windowHighs.IsReady && _windowLows.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IBaseDataBar input)
 Computes the next value of this indicator from the given state More...
 
virtual PivotPoint FindNextLowPivotPoint (RollingWindow< IBaseDataBar > windowLows, int midPointIndexOrSurroundingBarsCount)
 Looks for the next low pivot point. More...
 
virtual PivotPoint FindNextHighPivotPoint (RollingWindow< IBaseDataBar > windowHighs, int midPointIndexOrSurroundingBarsCount)
 Looks for the next high pivot point. More...
 
virtual decimal ConvertToComputedValue (PivotPoint highPoint, PivotPoint lowPoint)
 Method for converting high and low pivot points to a decimal value. More...
 

Properties

int WarmUpPeriod [get, protected set]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Events

EventHandler< PivotPointsEventArgsNewPivotPointFormed
 Event informs of new pivot point formed with new data update More...
 

Detailed Description

Pivot Points (High/Low), also known as Bar Count Reversals, indicator. https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/pivot-points-high-low

Definition at line 27 of file PivotPointsHighLow.cs.

Constructor & Destructor Documentation

◆ PivotPointsHighLow() [1/3]

QuantConnect.Indicators.PivotPointsHighLow.PivotPointsHighLow ( int  surroundingBarsCount,
int  lastStoredValues = 100 
)

Creates a new instance of PivotPointsHighLow indicator with an equal high and low length

Parameters
surroundingBarsCountThe length parameter here defines the number of surrounding bars that we compare against the current bar high and lows for the max/min
lastStoredValuesThe number of last stored indicator values

Definition at line 56 of file PivotPointsHighLow.cs.

◆ PivotPointsHighLow() [2/3]

QuantConnect.Indicators.PivotPointsHighLow.PivotPointsHighLow ( int  surroundingBarsCountForHighPoint,
int  surroundingBarsCountForLowPoint,
int  lastStoredValues = 100 
)

Creates a new instance of PivotPointsHighLow indicator

Parameters
surroundingBarsCountForHighPointThe number of surrounding bars whose high values should be less than the current bar's for the bar high to be marked as high pivot point
surroundingBarsCountForLowPointThe number of surrounding bars whose low values should be more than the current bar's for the bar low to be marked as low pivot point
lastStoredValuesThe number of last stored indicator values

Definition at line 66 of file PivotPointsHighLow.cs.

◆ PivotPointsHighLow() [3/3]

QuantConnect.Indicators.PivotPointsHighLow.PivotPointsHighLow ( string  name,
int  surroundingBarsCountForHighPoint,
int  surroundingBarsCountForLowPoint,
int  lastStoredValues = 100 
)

Creates a new instance of PivotPointsHighLow indicator

Parameters
nameThe name of an indicator
surroundingBarsCountForHighPointThe number of surrounding bars whose high values should be less than the current bar's for the bar high to be marked as high pivot point
surroundingBarsCountForLowPointThe number of surrounding bars whose low values should be more than the current bar's for the bar low to be marked as low pivot point
lastStoredValuesThe number of last stored indicator values

Definition at line 78 of file PivotPointsHighLow.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.PivotPointsHighLow.ComputeNextValue ( IBaseDataBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 94 of file PivotPointsHighLow.cs.

Here is the call graph for this function:

◆ FindNextLowPivotPoint()

virtual PivotPoint QuantConnect.Indicators.PivotPointsHighLow.FindNextLowPivotPoint ( RollingWindow< IBaseDataBar windowLows,
int  midPointIndexOrSurroundingBarsCount 
)
protectedvirtual

Looks for the next low pivot point.

Parameters
windowLowsrolling window that tracks the lows
midPointIndexOrSurroundingBarsCountThe midpoint index or surrounding bars count for lows
Returns
pivot point if found else null

Definition at line 123 of file PivotPointsHighLow.cs.

Here is the caller graph for this function:

◆ FindNextHighPivotPoint()

virtual PivotPoint QuantConnect.Indicators.PivotPointsHighLow.FindNextHighPivotPoint ( RollingWindow< IBaseDataBar windowHighs,
int  midPointIndexOrSurroundingBarsCount 
)
protectedvirtual

Looks for the next high pivot point.

Parameters
windowHighsrolling window that tracks the highs
midPointIndexOrSurroundingBarsCountThe midpoint index or surrounding bars count for highs
Returns
pivot point if found else null

Definition at line 152 of file PivotPointsHighLow.cs.

Here is the caller graph for this function:

◆ ConvertToComputedValue()

virtual decimal QuantConnect.Indicators.PivotPointsHighLow.ConvertToComputedValue ( PivotPoint  highPoint,
PivotPoint  lowPoint 
)
protectedvirtual

Method for converting high and low pivot points to a decimal value.

Parameters
highPointnew high point or null
lowPointnew low point or null
Returns
a decimal value representing the values of high and low pivot points

Definition at line 183 of file PivotPointsHighLow.cs.

Here is the caller graph for this function:

◆ Reset()

override void QuantConnect.Indicators.PivotPointsHighLow.Reset ( )

Resets this indicator to its initial state

Definition at line 206 of file PivotPointsHighLow.cs.

◆ GetHighPivotPointsArray()

PivotPoint [] QuantConnect.Indicators.PivotPointsHighLow.GetHighPivotPointsArray ( )

Get current high pivot points, in the order such that first element in collection is the nearest to the present date

Returns
An array of high pivot points.

Returned array can be empty if no points have been registered yet/

Definition at line 219 of file PivotPointsHighLow.cs.

◆ GetLowPivotPointsArray()

PivotPoint [] QuantConnect.Indicators.PivotPointsHighLow.GetLowPivotPointsArray ( )

Get current low pivot points, in the order such that first element in collection is the nearest to the present date

Returns
An array of low pivot points.

Returned array can be empty if no points have been registered yet/

Definition at line 229 of file PivotPointsHighLow.cs.

◆ GetAllPivotPointsArray()

PivotPoint [] QuantConnect.Indicators.PivotPointsHighLow.GetAllPivotPointsArray ( )

Get all pivot points, in the order such that first element in collection is the nearest to the present date

Returns
An array of low and high pivot points. Ordered by time in descending order.

Returned array can be empty if no points have been registered yet/

Definition at line 239 of file PivotPointsHighLow.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.PivotPointsHighLow.IsReady => _windowHighs.IsReady && _windowLows.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 44 of file PivotPointsHighLow.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.PivotPointsHighLow.WarmUpPeriod
getprotected set

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 49 of file PivotPointsHighLow.cs.

Event Documentation

◆ NewPivotPointFormed

EventHandler<PivotPointsEventArgs> QuantConnect.Indicators.PivotPointsHighLow.NewPivotPointFormed

Event informs of new pivot point formed with new data update

Definition at line 39 of file PivotPointsHighLow.cs.


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