indicator · own pane · open source
ADX and DI indicator
ADX and DI is a free open-source indicator. ADX with +DI and -DI in one pane. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What ADX and DI does
ADX with +DI and -DI in one pane. ADX measures trend strength regardless of direction; +DI/-DI tell you which side is winning.
- ADX above 25 = a trend worth following.
- +DI over -DI = bulls in control, the opposite = bears.
- Great filter for any breakout or mean-reversion system.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("ADX and DI", overlay=false)
len = input.int(14, "DI Length", minval=2, maxval=200)
smooth = input.int(14, "ADX Smoothing", minval=1, maxval=50)
colorMid = input.color("color.orange", "Color Mid")
colorUp = input.color("color.green", "Color Up")
colorDown = input.color("color.red", "Color Down")
colorNeutral = input.color("color.gray", "Color Neutral")
[plus, minus, adx] = ta.dmi(len, smooth)
hline(25, "Trend Threshold", color=colorNeutral, linestyle=hline.style_dashed)
p_ADX = plot(adx, "ADX", color=colorMid, linewidth=2)
p_Plus_DI = plot(plus, "Plus DI", color=colorUp)
p_Minus_DI = plot(minus, "Minus DI", color=colorDown)
alertcondition(ta.crossover(adx, 25), "ADX crosses 25 up", "ADX entered a trending regime")
alertcondition(ta.crossover(plus, minus), "+DI crosses -DI up", "Directional bias flipped bullish")
No comments yet.
Sign in to comment.