The Efficiency Ratio (ER) was first presented by Perry Kaufman in his 1995 book ‘Smarter Trading‘. It is calculated by dividing the price change over a period by the absolute sum of the price movements that occurred to achieve that change. The resulting ratio ranges between 0 and 1 with higher values representing a more efficient or trending market.
The Kaufman Eifficiency Ratio is also know as Fractal Efficiency. It can be used as a filter to differentiate between trending conditions and sideways markets.
// parameter
// n = 10
Change = ABS(close - close[n])
calc = ABS(close-close[1])
volat = summation[n](calc)
ER = Change / volat
RETURN ER as "Kaufman's Efficiency Ratio"