Trading with ADX indicator involves the following signals:
ADX staying below 20 level — there is no trend or the trend is weak.
ADX moving above 20 level — trend is strong.
ADX passing 40 level — trend is extreme.
ADX value rising — trend is going stronger, falling — trend is weakening.
+DI stays on top of -DI — uptrend is in place.
-DI stays on top of +DI — downtrend is in place.
Two DI cross — trend is changing.
Average Directional Index (ADX)
The Average Directional Index (ADX) depicts a presence or absence of a trend. ADX advices on the strength of the dominant forces that move market prices here and now.
In other words, ADX advices on trend tendencies: whether the trend is going to continue and strengthen or it is about to lose its positions.
How to interpret ADX
ADX indicator has 2 lines: ADX itself (white), +DI (green) and -DI (red).
Traders then need to draw a horizontal line at the level of 20.
All readings of ADX which are below 20 suggest a weak and unclear trend, while readings above 20 indicate that a trend has picked up.
That is, basically, the simplest explanation of the purpose of ADX. ADX allows Forex traders to determine whether the trend is strong or weak and thus choose and appropriate strategy to trade with: a trend following strategy or a strategy fit to consolidation market periods with no significant price changes.
There is also additional line to be added to ADX indicator window - at 40 level.
How to trade with ADX
Trading with ADX looks as follows:
If ADX is traded below 20 - there is no trend or the trend is weak, thus a non-trend-following strategies should be used, otherwise losses may occur as a result of false signals and whip-saws taking place. An example of non-trend-following method is channel trading.
If ADX is traded above 20 but below 40, it is time to apply trend following methods. An example would be: Forex trading Moving averages or or trading with Parabolic SAR indicator.
When ADX reaches 40 level, it suggests an overbought/oversold (depending on the trend) situation on the market and it is time to protect some profits of at least move Stop loss order to a break even.
When ADX passes 40 level, it is a good time to begin collecting profits gradually scaling out of the trades on rallies and sell-offs and protecting remaining positions with trailing stops.
ADX -/+ DI lines are used for spotting entry signals. All -/+ DI crossovers are disregarded while ADX remains below 20. Once ADX peaks above 20 a buy signal occur when +DI (green) crosses upwards and above -DI (red). A sell signal will be the opposite: +DI would cross -DI downwards.
If after a newly created signal another opposite crossover happens within a short period of time, the original signal should be disregarded and position protected soon or closed.
ADX indicator is never traded alone, but rather in combination with other indicators and tools. ADX indicator most of the time gives much later signals comparing to faster reacting moving averages crossover or Stochastic, for example, however, reliability of ADX indicator is much higher than for other indicators in traders' toolkit, which makes it a valuable tool for many Forex traders.
And just one more idea to test out:
When ADX rises above 20 for the first time and then goes flat for some time, there is believed to be a new trend being born and the reason for ADX being currently flat is because market reacts to this new trend formation by making first initial correction. During this correction it is a good time to initiate new orders.
using System; using System.Collections; using System.Collections.Generic; using System.Text; using PTLRuntime.NETScript; using System.Drawing; namespace ind { //--------------------------------------------------- // Project: ADX // Type: Indicator // Author: PFSoft LLC // Company: PFSoft LLC /www.pfsoft.com/ // Copyright: (C) PFSoft LLC Dnepropetrovsk. Ukraine // Created: Nov, 28,2006 //--------------------------------------------------- public class ADX : NETIndicator { public ADX() : base() { ProjectName = "Average Directional Index"; Comments = "Determines the strength of a prevailing trend"; SetIndicatorLine("adx", Color.Green, 1, LineStyle.SimpleChart); SetIndicatorLine("plusDI", Color.Blue, 1, LineStyle.SimpleChart); SetIndicatorLine("minusDI", Color.Red, 1, LineStyle.SimpleChart); SeparateWindow = true; } [InputParameter("Type of Moving Average", 0, new object[] { "Simple", "SMA", "Exponential", "EMA", "Modified", "MMA", "Linear Weighted", "LWMA"} )] public string MAType = "SMA"; [InputParameter("Period of Moving Average", 1)] public int MAPeriod = 13; public const int ARRAY_PDM = 0; public const int ARRAY_MDM = 1; public const int ARRAY_TR = 2; public const int ARRAY_DX = 3; public override void OnQuote() { int count = platform.BarsCount(platform.Symbol, platform.Period); if (count<2) return; // Calculation of true range and average true range ptl.Array[ARRAY_TR] = ptl.TrueRange; double smoothedTR = GetMA(count, ARRAY_TR); // Calculation of directional movement (DMs) double plusDM = ptl.High - ptl.High[1]; if(plusDM<0.0) plusDM = 0.0; double minusDM = ptl.Low[1] - ptl.Low; if(minusDM<0.0) minusDM = 0.0; if(plusDM>minusDM) minusDM = 0.0; else plusDM = 0.0; ptl.Array[ARRAY_PDM] = plusDM; ptl.Array[ARRAY_MDM] = minusDM; // Calculation of directional indices (DIs) double plusDI; double minusDI; if(smoothedTR>0.0) { plusDI = 100.0*(GetMA(count, ARRAY_PDM)/smoothedTR); minusDI = 100.0*(GetMA(count, ARRAY_MDM)/smoothedTR); } else { plusDI = 0.0; minusDI = 0.0; }; // Calculation of DX (ADX) ptl.Array[ARRAY_DX] = (ptl.MathAbs(plusDI - minusDI)/(plusDI + minusDI))*100.0; double adx = GetMA(count, ARRAY_DX); // Setting values platform.SetValue(0, 0, adx); platform.SetValue(1, 0, plusDI); platform.SetValue(2, 0, minusDI); } public double GetSMA(int count, int arrayNumber) { int i = 0; // Usual counter double summa = 0.0; // Sum of prices // Loop of calculation. The loop skips empty bars while( (i<MAPeriod) && (i<count) ) { summa += platform.Array[arrayNumber, i]; i++; } // Returning current value of the SMA return summa/MAPeriod; } public double GetEMA(int count, int arrayNumber) { // Calculation of a coefficient double k = 2.0/(MAPeriod + 1); // Getting current price double value1 = platform.Array[arrayNumber, 1]; // returning value return value1 + k*(ptl.Array[arrayNumber] - value1); } public double GetMMA(int count, int arrayNumber) { int i = 0; // Usual counter double mma = ptl.Array[arrayNumber]; // Current price double k = 1.0/MAPeriod; // coefficient // Loop of calculation. The loop skips empty bars while( (i<MAPeriod) && (i<count) ) { // Bar is not empty, adding it's price to the summa double price = platform.Array[arrayNumber, i]; mma = price*k + mma*(1.0 - k); // going to the next bar i++; } // Returning of mma return mma; } public double GetLWMA(int count, int arrayNumber) { int i = 0; // Usual counter double numerator = 0.0; // Numerator of the rate double denominator = 0.0; // Denominator of the rate int period = MAPeriod; // Loop of calculation. The loop skips empty bars while( (i<MAPeriod) && (i<count) ) { numerator += period*platform.Array[arrayNumber, i]; denominator += period; period--; i++; } // returning current value if(denominator>0.0) return numerator/denominator; else return 0.0; } public double GetMA(int count, int arrayNumber) { double result = 0.0; switch(MAType) { case "SMA": result = GetSMA(count, arrayNumber); break; case "EMA": result = GetEMA(count, arrayNumber); break; case "LWMA": result = GetLWMA(count, arrayNumber); break; case "MMA": result = GetMMA(count, arrayNumber); break; } return result; } } }
Comments