indicator · own pane · open source

Disparity Index

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

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 Length for a steadier baseline.

Source code

//@version=5
indicator("Disparity Index", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
src = input.source("close", "Source")
disp = 100.0 * (src - ta.sma(src, len)) / ta.sma(src, len)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dotted)
p_Disparity = plot(disp, "Disparity", color=color.purple, linewidth=2)
alertcondition(ta.crossover(disp, 0), "Disparity up", "Disparity crossed above zero")
alertcondition(ta.crossunder(disp, 0), "Disparity down", "Disparity crossed below zero")

Comments

No comments yet.

Sign in to comment.