Pivots
Previous Topic  Next Topic 

Definition

Courtesy of Investopedia

Syntax
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width)
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width)

Returns pivot point value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).PP[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).PP[int barsAgo]

Returns R1 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R1[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R1[int barsAgo]

Returns R2 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R2[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R2[int barsAgo]

Returns R3 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R3[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).R3[int barsAgo]

Returns S1 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S1[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S1[int barsAgo]

Returns S2 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S2[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S2[int barsAgo]

Returns S3 value
Pivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S3[int barsAgo]
Pivots(IDataSeries inputData, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width).S3[int barsAgo]


Return Type
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.


Parameters

inputData

Indicator source data (?)

pivotRangeType

Sets the range for the type of pivot calculated. Possible values are:

PivotRange.Daily

PivotRange.Weekly

PivotRange.Monthly

priorDayHLC

Sets how the prior range High, Low, Close values are calculated. Possible values are:

HLCCalculationMode.CalcFromIntradayData

HLCCalculationMode.DailyBars

HLCCalculationMode.UserDefinedValues


Examples

// Prints the current pivot point value
double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP[0];
Print("The current Pivots pivot value is " + value.ToString());

// Prints the current S2 pivot value
double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).S2[0];
Print("The current Pivots S2 pivot value is " + value.ToString());


Source Code
You can open up the indicator source code via the NinjaScript Editor.