Elder's Force Index Function (with source)

TradingView has built in functions for RSI , Momentum, and many other oscillators. Why the source isn't available for Elder's Force Index is beyond me. To me it's one of the Holy Grail indicators. This is EFI indicator with a simple function inside the source code. You're can easily copy this function into any study(indicator) or strategy that uses built-in oscillators, as a replacement.

Example using EFI instead of RSI in built-in Divergence Indicator:

//Discord: Sheldon#7775
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?