A slightly enhanced Ease of Movement indicator:
- Draws a line at 0
- Colors the line based on ratio of current to the highest for the last 150 bars (changeable)
study(title="blackdog6621s Ease of Movement with Colors v1", shorttitle="EOM Colors v1", precision=1) div = input(10000, title="Divisor", minval=1) length = input(14, minval=1) colorLookback = input(150, minval=1) eom = sma(div * change(hl2) * (high - low) / volume, length) compareMax = eom >= 0 ? highest(eom, colorLookback) : -lowest(eom, colorLookback) bottomThird = abs(eom) <= (compareMax * 0.4) midThird = abs(eom) <= (compareMax * 0.8) plot(eom, color=bottomThird ? red : midThird ? yellow : green) hline(0, title="Midline", color=gray, linestyle=dashed)