Documentation / Indicators

AccumDistr is the classical Accumulation/Distribution indicator.

Use :

AccumDistr(price)

 

The accumulation/distribution of price is calculate that way :

myAD = sum[volume*((Close-Low) - (High-Close)) / (High-Low)] 

 

The indicator balances volumes using the closing price reported at the extreme points of the trading day.

It must confirm the stock trend in progress by moving in the same direction as the stock trend. A divergence between prices and Accumulation/Distribution is often a signal that the current trend may reverse. Continue reading “AccumDistr” »

Technical indicator Average Directionnal Index, usually known as ADX.

Calculation:

We first calculate +DM and -DM (the directional movement) , the number of points obtained in a direction. We apply a wilder moving average on +DM and -DM to calculate +DI and -DI. Then we calculate DX.

Dx = 100 x ((+DI) – (-DI)) / ((+DI) + (-DI)).

Finally to obtain ADX we apply again a wilder moving average on DX.

 

Syntax :

//N as Number of periods for calculation

ADX[N]

Continue reading “ADX” »

Indicator Average Directional Index Rate, also known as “ADXR”. Compute with N periods :

ADXR[N]

ADXR formula : ADXR = (ADX + ADX[n]) / 2

 

Calculation of ADX :

We first calculate +DM and -DM (the directional movement) , the number of points obtained in a direction. We apply a wilder moving average on +DM and -DM to calculate +DI and -DI. Then we calculate DX.

Dx = 100 x ((+DI) – (-DI)) / ((+DI) + (-DI)).

Finally to obtain ADX we apply again a wilder moving average on DX.

Continue reading “ADXR” »

Call of technical indicator Aroon for its Down value over N periods.

Syntax:

AroonDown[N]

Calculation:

The indicator is composed of 2 lines, Aroon Up and Down that represent the number of days since the most recent x-period high for Aroon Up and x-period low for Aroon Down.

For example, if a stock market makes a new x-day high, the Aroon Up = 100; On the other hand, if a stock has not made a new high for x days, the Aroon Up = 0.

Continue reading “AroonDown” »

Call of technical indicator Aroon for its Up value over N periods.

Syntax:

AroonUp[N]

Calculation:

The indicator is composed of 2 lines, Aroon Up and Down that represent the number of days since the most recent x-period high for Aroon Up and x-period low for Aroon Down.

For example, if a stock market makes a new x-day high, the Aroon Up = 100; On the other hand, if a stock has not made a new high for x days, the Aroon Up = 0.

Continue reading “AroonUp” »

Simple Moving Average (MA) of N periods.

Syntax:

Average[N](price)

Average instruction can be extend with a second parameter under brackets to modify the arithmetic calculation of the average :

Average[N,M](price)

Where M can be set with any of these values, to return the specific moving average calculation:

0 = SMA

1 = EMA

2 = WMA

3 = Wilder

4 = Triangular

5 = End point

6 = Time series

Continue reading “Average” »

Technical indicator “Average True Range”, also usually named as “ATR”

Syntax:

AverageTrueRange[N](price)

Calculation :

This represents the volatility of a stock.

True range is the highest data in absolute value among :

(today’s high – today’s low)

(today’s high – yesterday’s close)

(today’s low – yesterday’s close)

 

To calculate the Average True Range, it is necessary to apply a Wilder moving average of the True Range.

Continue reading “AverageTrueRange” »

Return the “Bollinger Band Width” technical indicator value.

The Bollinger band width is calculated by making the difference of the upper and lower band of the original Bollinger Band indicator. High volatility means high value of the indicator.

Syntax:

BollingerBandWidth[N](price)

Calculation :

Indicator = ((Boll+) – (Boll-)) / moving average

This indicator is calculated with the bollinger bands. It helps indicate if the market is in a strong trend or not.

Continue reading “BollingerBandWidth” »

Return value of the Lower Bollinger band technical indicator.

Syntax:

BollingerDown[N](price)

Calculation :

Bollinger bands are enveloppes based on a moving average and a standard deviation.

This standard deviation makes bands widen or narrow, according to market volatility. The first parameter is the number of days for the moving average. Second parameter is the standard deviation.

Continue reading “BollingerDown” »

Return value of the Upper Bollinger band technical indicator.

Syntax:

BollingerUp[N](price)

 

Example:

//last bar piercing the upper Bollinger Bands
bollU = BollingerUp[20](close)

if(Open[1]<bollU[1] AND Close[1]>bollU[1]) THEN
          VAR = -1
ELSE
          VAR = 0
ENDIF

RETURN VAR as "UPPER PIERCING SIGNAL"

 


Top