Here is a variation of my favorite indicator.
code based on Gabri ADX:
period=14
mm=3
//computation of Directional Movement indicators
up=high-high[1]
dw=low[1]-low
if up>dw and up>=0 then
plusdm=up
else
plusdm=0
endif
if dw>up and dw>=0 then
mindm=dw
else
mindm=0
endif
//computation of TR
mioTR=max(abs(high-close[1]),max(abs(low-close[1]),range))
mioATR=average[period,MM](mioTR)
//computation of DI
dip=100*average[period,MM](plusdm)/mioATR
dim=100*average[period,MM](mindm)/mioATR
//computation of smoothed ADX & non smoothed ADX
mioADXn=100*average[period,MM](abs(dip-dim)/(dip+dim))
mioADXnonSmoothed=100*(abs(dip-dim)/(dip+dim))
//return of data
return mioadxn as "ADX Normal",20 as "20",mioADXnonSmoothed as "ADX Fast",0 as "Zero reversal",50 as "50 Reversal"