Revisualizing The ADX Oscillator

The importable AIQ EDS file based on Neil Jon Harrington’s article in the October 2024 issue of Technical Analysis of Stocks & Commodities magazine, titled “Revisualizing The ADX Oscillator,” Introduces a new, re-envisioned ADX that provides more information to the trader and makes ADX readings more intuitive and easier to visualize, can be obtained on request via rdencpa@gmail.com. The code is also shown here:

!DMI & ADX indicators 
!Coded by Rich Denning, 10/14/24
	
Dailyrange is [high]-[low].
Ycloseh is abs(val([close],1)-[low]).
Yclosel is abs(val([close],1)-[high]).
Trange1 is Max(Dailyrange,Ycloseh).
Trange is Max(Trange1,Yclosel).

define HarringtonLength 10.
define sLen 5.
define ADXlow 15.
define ADXHigh 40.

!To convert Wilder averaging to exponential averaging use this formula:
!ExponentialPeriods = 2 * WilderPeriod - 1.

days is 2 * HarringtonLength - 1.

!+DM CODE:
yhigh is val([high],1).
ylow is val([low],1).
rhigh is ([high]-yhigh).
rlow is (ylow-[low]).
DMplus is iff(rhigh > 0 and rhigh > rlow, rhigh, 0).
DMminus is iff(rlow > 0 and rlow >= rhigh, rlow, 0).
	
AvgPlusDM is expAvg(DMplus,days).
AvgMinusDM is expavg(DMminus,days).
                  	
!AVERAGE TRUE RANGE:
ATR is expAvg(Trange,Days).
!DMI CODE:
PlusDMI is (AvgPlusDM/ATR)*100.	
sPlusDMI is simpleavg(PlusDMI,sLen).
MinusDMI is AvgMinusDM/ATR*100.	
sMinusDMI is simpleavg(MinusDMI,sLen).

!PLOT sDIdiff as historigram:           
  sDIdiff is sPlusDMI-sMinusDMI. 		 
  ZERO if sPlusDMI = 0 and sMinusDMI = 0.
  sDIsum is sPlusDMI+sMinusDMI.
  sDX is iff(ZERO,100,abs(sDIdiff)/sDIsum*100).
!PLOT ADX as single line indicator with support at 15:
  sADX is ExpAvg(sDX,days).		

Green if sDIdiff > 0 and sADX > ADXlow.
Red if sDIdiff <= 0 and sADX <= ADXlow.

Code for the author’s indicator is set up in the AIQ EDS code file. Figure 7 demonstrates the indicator on a daily chart of the QQQ. Note that I did not implement here all of the colors the author uses. I implemented the strong up (green), strong down (red) and neutral (yellow).

Sample Chart

FIGURE 7: AIQ. The indicator is displayed on a chart of the NASDAQ-100 ETF (QQQ).

—Richard Denning
rdencpa@gmail.com
for AIQ Systems