indicator · own pane · open source
Efficiency Ratio indicator
Efficiency Ratio is a free open-source indicator by @deepwick. Efficiency Ratio is Kaufman's ratio of net price movement to total path. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Efficiency Ratio does
Efficiency Ratio is Kaufman's ratio of net price movement to total path. 100 = perfectly straight, 0 = pure noise.
- Above 30 = trending, below 30 = chop.
- Raise
Lengthfor steadier readings. - Filter all your other systems by it — only take signals when ER > 30.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Efficiency Ratio", overlay=false)
len = input.int(10, "Length", minval=2, maxval=200)
src = input.source(close, "Source")
colorMid2 = input.color("color.teal", "Color Mid2")
colorNeutral = input.color("color.gray", "Color Neutral")
direction = math.abs(src - src[len])
path = math.sum(math.abs(ta.change(src)), len)
er = direction / path
erPct = 100.0 * er
hline(30, "Trending", color=colorNeutral, linestyle=hline.style_dashed)
hline(70, "Strong trend", color=colorNeutral, linestyle=hline.style_dashed)
p_ER = plot(erPct, "ER", color=colorMid2, linewidth=2)
alertcondition(ta.crossover(erPct, 30), "ER enters trend", "Efficiency Ratio crossed above 30")
alertcondition(ta.crossunder(erPct, 30), "ER leaves trend", "Efficiency Ratio dropped below 30")
No comments yet.
Sign in to comment.