Histogram of ADX slope
study(title="Directional Movement Index - ADX Slope", shorttitle="ADX-SLOPE") len = input(14, title="DI Length", minval=1) lensig = input(14, title="ADX Smoothing", minval=1, maxval=50) lenslp = input(1, title="Slope Length", minval=1) up = change(high) down = -change(low) trur = rma(tr, len) plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / trur) minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / trur) sum = plus + minus adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig) slope = (adx - adx[lenslp])/lenslp hline(0, color=gray, title="Zero") plot(slope, color=black, title="ADX Slope", style=histogram)