Moving Average ADX

ADX Smoothing Trend Color Change on Moving Average and ADX Cross. Use on Hourly Charts - Green UpTrend - Red DownTrend - Black Choppy No Trend
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Moving Average ADX", shorttitle="MA ADX", overlay=true)

lenadx = input(14, minval=1, title="DI Length")
lensig = input(14, title="ADX Smoothing", minval=1, maxval=50)
limadx = input(18, minval=1, title="ADX MA Active")

up = change(high)
down = -change(low)
trur = rma(tr, lenadx)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, lenadx) / trur)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, lenadx) / trur)
sum = plus + minus 
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)

macol = adx > limadx and plus > minus ? lime : adx > limadx and plus < minus ? red :black

len = input(34, minval=1, title="Length")
src = input(close, title="Source")
out = wma(src, len)
plot(out, color=macol, title="MA", linewidth= 3)

Thanks. nice indicator
Capn - I am a big fan of what you have built here. Quick question : what does the 34 default value for the "length" do ? Is that the MA length and what does changing the length do to the colors and the trend...if anything ? I ask because when I change the length, the new line comes close to, but does not align exactly with a similar moving average length (sma or ema).
+2 Reply
Great addition. Thanks Cap.
thank you.
very noce indicator;
maybe you can also add a feature to set adx ranges as an input;
for example:
dotted lines when adx<20
solid lines when 20<adx<40
bold solid lines when adx>40

CapnOscar guidoisot
am working on advanced version of its keep following.. I will consider your comments
guidoisot guidoisot
very nice
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out