AGet.biasReversal()

ICE Data Services -

AGet.biasReversal() Advanced GET Studies

Returns the series or values of the GET Bias Reversal study.
The Bias Reversal indicates a potential change in trend (a reversal of a bias) point.
Syntax
AGet.biasReversal( Filter , Sensitivity [, sym() | inv() ][, BarIndex ] )
Parameters
Parameter: Description: Default:
Filter A boolean value. When True, the Filter removes any Bias Reversal signals that have been marked as false signals. When False, false Bias Reversal signals will be returned.

 

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 when
nBarIndex 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:
NONE = 0TRUE_BULLISH = 1TRUE_BEARISH = -1FALSE_BULLISH = 2FALSE_BEARISH = -2
Notes
Only available in versions 11.8 or later.
Code Example
Creating and Using Series Example:
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());        });    };}        
See Also
Advanced GET Study Functions