OPEN-SOURCE SCRIPT

KAIRI RELATIVE INDEX

An old but gold Japanese indicator for Mean Reverting strategies and ideal for Pairs Trading...

The Kairi Relative Index measures the distance between closing prices and a Moving Average in percent value (generally SMA).
Extreme reading in the KRI are considered buy and sell signals.
Extreme readings will vary by asset, with more volatile assets reaching much higher and lower extremes that more sedate assets.
The KRI is not an accurate timing signal, and therefore, should be combined with other forms of analysis to generate trade signals.


You can calculate percent difference between the price and 10 different types of Moving Averages in this version of KAIRI as:

SMA : Simple Moving Average
EMA : Exponential Moving Average
WMA : Weighted Moving Average
TMA : Triangular Moving Average
VAR : Variable Index Dynamic Moving Average a.k.a. VIDYA
WWMA : Welles Wilder's Moving Average
ZLEMA : Zero Lag Exponential Moving Average
TSF : True Strength Force
HULL : Hull Moving Average
VWMA: Volume Veighted Moving Average

Personal advice: try using bigger length of Moving Averages like 50-100-200 for pairs and mean reversion strategies
FR3762kivanckivancozbilgicmeanreversionMoving Averagespairspairstrading

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Telegram t.me/AlgoRhytm

YouTube (Turkish): youtube.com/c/kivancozbilgic

YouTube (English): youtube.com/c/AlgoWorld
Also on:

Disclaimer