The efficiency ratio - also known as fractal efficiency - is based on the work of Perry Kaufman. He has used it in the KAMA (Kaufman Adaptive Moving Average) to adapt the lookback period.
The idea behind the indicator is straightforward. You select a lookback period, such as N = 7 bars. Then you look at the absolut amount of the 7 price moves from close to close (1-bar momentum) add them up and compare the result to the aggregate price move over 7 bars (7-bar momentum). When the sum of the 7 absolute price moves adds up to match the aggregate price move the efficiency is 100%.
The chart below shows 7 consecutive price bars that all move up. This corresponds to a highly efficient market, as there is little friction (overlap) in the price move. The efficiency ratio calculated over 7 bars is 78.8%. It is not 00% because the bars are slightly overlapping. If you want none overlapping bars you simply take Renko bars, and you efficiency will increase to 100%. This shows that you cannot apply the indicator to Renko bars, because Renko bars are pretty liars.
When the market moves back and forth, the 7-bar momentum is small compared to the individual price moves and the efficiency ratio will drop to a value close to 0%.
How to determine whether a market is trending or ranging?
There is one technical problem with the efficiency ratio. If you increase the lookback period of the efficiency ratio, for example let us select a value of 100, this has an impact on the likelyhood that the efficiency ratio will reach its maximum value of 100%. You will often find 3 non-overlapping bars in the same direction, thus resulting in an efficiency ratio of 100% for a lookback period of 3 bars. However, if you select a lookback period of 100 bars, it can definitely be excluded that you will observe 100 non-overlapping bars in the same directions. Or otherwise put, the efficiency ratio will generally yield lower values, when the lookback period is increased.
The Efficiency Ratio does not pass the coherency test (C-test) suggested by William Eckhardt.
In order to deal with this problem, I have introduced a self-adjusting reference line that separates the trending state from the ranging state. The value for that reference line is calculated from the lookback period. For example:
-> for a lookback period of 3 bars the reference value is 49.1%.
-> for a lookback period of 7 bars the reference value is 32.1%.
-> for a lookback period of 20 bars the reference value is 19.0%.
-> for a lookback period of 100 bars the reference value is 8.5%.
Or otherwise put, if you look at 100 bars, you may already consider that a market is trending, when the efficiency ratio is larger than 8.5%. Over a lookback period of 3 bars, and effiency ratio of at least 49.1% is required to indicator a trending market.
The indicator version for NinjaTrader 7 already had this auto-adjusting reference line. With NinjaTrader 8 I have added a multiplier allowing for moving the chop line up or down depending on the individual requirements for the trading setups.
The modifications allow you to use the Efficiency Ratio with the same settings across different chart types and timeframes and use it as a trend versus chop filter.
I will post the indicator in the download section shortly.