EfficiencyRatio

forge.taclassSince Forge API 1
Signaturepython
forge.ta.EfficiencyRatio(**inputs: Any) -> None

How directly the price moved: 1 for a straight line, near 0 for noise.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint101 to 5000

Indicator: Efficiency ratio

ER[i] = |x[i] - x[i-period]| / sum(|x[j] - x[j-1]|) for j from i-period+1 to i

When the sum is zero, ER is 0. A window holding a missing value has no value.