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 :
1 2 3 4 |
//N as Number of periods for calculation ADX[N] |
Interpretation :
DI+ represents buying pressure and DI- selling pressure.
When DI+ > DI- it’s a bullish signal and when DI+ < DI – it’s a bearish signal.
ADX and ADXR are two indicators of movement. A trending market occurs when ADX and ADXR rises above the 17 or 23 level. On the other hand, if ADX and ADXR fall below the 17 or 23 level, there is no trend.
It’s possible to determine the entry and exit signals when +DI and -DI cross.
Suggestion :
When ADX and ADXR rises above the 17 or 23 level there is a trend, a buy or a sell signal given by the crossing of DI+ and DI- . If ADX and ADXR fall below the 17 or 23 leveln there is no trend. It is also worth watching when ADX falls below ADXR because the market trend is almost complete.
Example :
1 2 3 4 5 |
myPeriod = 21 myADX = ADX[myPeriod] RETURN myADX coloured(9,169,243) as "Average Directional Index" |