The disparity Index oscillator indicator reflect price change over the last n periods compared to a moving average as a percentage. The 0 level crossing can act as a bullish or bearish signals, because it reflects a recent price momentum. Contrarian traders may find it useful as extremes percentage deviation above or below the 0 level may be used to find reversal, while expecting the price will revert to the moving average, 0 level as the mean.
// parameters :
// period = 13
Dindex = ((Close-exponentialaverage[period](close))/exponentialaverage[period](close))*100
RETURN Dindex as "Disparity Index", 0