Returns the series or values of the GET Pivots study.Syntax
Pivots are a proprietary study that show the trend turning points of the issue's price performance. These Pivot points are labeled as Primary (P), Major (J), Intermediate (I), or Minor (M), depending on how long the issue maintains a particular price movement. Pivots are useful as starting or ending points when drawing Auto Gann Angles, Gann Boxes, Regression Trend Channels, Fibonacci Time, and other studies and tools.
AGet.pivots( ReturnSeries [, sym() | inv() ][, BarIndex ] )Parameters
Parameter: Description: Default:
PIVOTS_PRIMARY = 0
PIVOTS_MAJOR = 1
PIVOTS_INTERMEDIATE = 2
PIVOTS_INTERMEDIATE = 3
n/a sym() | inv() [Optional] Function of sym() or inv() to determine symbol/interval source for the study.
Base sym/int BarIndex [Optional] Bar index of series to retrieve.
n/a
Return Value(s)
Returns a Series Object whennBarIndex is not specified. It consists of the set of constants shown below.
Returns a single value when nBarIndex is specified from the set of constants shown below.
A set of constants:Notes
NONE = 0PIVOT_UP = 1PIVOT_DOWN = -1SMART_PIVOT_UP = 2SMART_PIVOT_DOWN = -2
Only available in versions 11.8 or later.Code Example
Creating and Using Series Example:See Also
var bInit = false;var xSer = null;var i = 0;setPriceStudy(true);function main(){ if(bInit == false){ xSer = AGet.pivots(PIVOTS_PRIMARY); bInit = true; }; if (isLastBarOnChart()){ clearText(); recalculate(function(){ var nSer = xSer.getValue(0); if (nSer == PIVOT_UP) drawTextRelative(0,AboveBar1,"P",Color.purple,null, Text.BOLD|Text.CENTER|Text.PRESET,"Arial",10,i++); }); } }
Advanced GET Study Functions