NinjaScript > Language Reference > Indicator Methods >

Woodies Pivots

Print this Topic Previous pageReturn to chapter overviewNext page

Description

Woodies CCI Club pivots indicator.

 

 

Syntax

WoodiesPivots(PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width)
WoodiesPivots(IDataSeries input, PivotRange pivotRangeType, HLCCalculationMode priorDayHLC, int width)

 

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

 

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

 

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

 

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

 

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

 

 

Return Value

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

 

 

Parameters

input

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 = WoodiesPivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).PP[0];
Print("The current Woodies Pivots' pivot value is " + value.ToString());

 

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

 

 

Tips

1.When using HLCCalculationMode.DailyBars it can be expected that a value of 0 is returned when the daily bars have not been loaded yet. Due to the asynchronous nature of this indicator calling daily bars you should only access the pivot values when the indicator has loaded all required Bars objects. To ensure you are accessing accurate values you can use .ContainsValue() as a check:
 

// Checks that this is a valid Woodies Pivots value

if (WoodiesPivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP.ContainsValue(0))
{

    // Prints the current pivot point value

    double value = WoodiesPivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).PP[0];
    Print("The current Woodies Pivots' pivot value is " + value.ToString());

}