indicator · own pane · open source
Disparity Index indicator
Disparity Index is a free open-source indicator. Disparity Index measures price distance from its SMA in percent. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Disparity Index does
Disparity Index measures price distance from its SMA in percent. Above 0 = price above its MA, below 0 = price below.
- Extreme readings flag short-term blowoffs vs the trend.
- Use with an MA crossover to fade overextensions.
- Raise
Lengthfor a steadier baseline.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Disparity Index", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
src = input.source(close, "Source")
colorBg = input.color("color.purple", "Color Bg")
colorNeutral = input.color("color.gray", "Color Neutral")
disp = 100.0 * (src - ta.sma(src, len)) / ta.sma(src, len)
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dotted)
p_Disparity = plot(disp, "Disparity", color=colorBg, linewidth=2)
alertcondition(ta.crossover(disp, 0), "Disparity up", "Disparity crossed above zero")
alertcondition(ta.crossunder(disp, 0), "Disparity down", "Disparity crossed below zero")
No comments yet.
Sign in to comment.