Returns the series or values of the GET Bias Reversal study.Syntax
The Bias Reversal indicates a potential change in trend (a reversal of a bias) point.
AGet.biasReversal( Filter , Sensitivity [, sym() | inv() ][, BarIndex ] )Parameters
Parameter: Description: Default:
n/a Sensitivity Allows to choose between Normal and Tight sensitivity level for the Bias Reversal calculation. To choose sensitivity level use constants:
BIASREVERSAL_NORMAL = 0
BIASREVERSAL_TIGHT = 1
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 = 0TRUE_BULLISH = 1TRUE_BEARISH = -1FALSE_BULLISH = 2FALSE_BEARISH = -2
Only available in versions 11.8 or later.Code Example
Creating and Using Series Example:See Also
var bInit = false;var xSer = null;setPriceStudy(true);function main(){ if(bInit == false){ xSer = AGet.biasReversal(true, BIASREVERSAL_NORMAL); bInit = true; }; if (isLastBarOnChart()){ clearShape(); recalculate(function(){ var nSer = xSer.getValue(0); if (nSer == null || nSer == NONE) return; var location = null; var color = null; var shape = null; if (nSer > 0){ location = TopRow1; color = Color.red; shape = Shape.DOWNTRIANGLE; } else{ location = BottomRow1; color = Color.blue; shape = Shape.UPTRIANGLE; }; drawShape(shape,location,color,"Bias" + getCurrentBarCount()); }); };}
Advanced GET Study Functions