This indicator combines a dynamic Seasonal Random Index (SRI) with a dynamic Karobein Oscillator and a pattern-similarity search algorithm in a separate pane.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
147 lines of Pine Script v4 from scripts/115-Similarity-Search-KO-and-SRI.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Similarity Search, Karobein and Seasonal Random Index normalizes SRI into seasoned and deseasoned series, shading the area green or red to signal trend direction and plotting circle markers on crossovers. The similarity search scans historical Karobein oscillator patterns across a user-defined lookback window to forecast the next bar's directional movement with midline arrow symbols. Users can adjust lag boundaries, adaptation percentages, search depth, and matching tolerance.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Dataset
source
close
ds
Minimun Lag (Season) |0..n|
int
5
minlag
Maximun Lag |1..n|
int
60
maxlag
Adaptation (%)
input
0.
pct
===Karobein Dynamic===
bool
true
kosc
Karobein Minimum Lag |1..n|
int
1
minlen
Karobein Maximum Lag |1..n|
int
42
maxlen
Adaptation (%)
input
10.
pct2
Search algorithm
string
Multiple-Check
algo
Search Lookback |5..n|
int
740
depth
Search Tolerance |0.0..1.0|
float
0.05
tolerance
Prediction Line Lag |5..n|
int
20
lag
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator plots an oscillator in a separate pane. It builds several SuperTrend series across a user-defined factor range and step, using ATR as the band width. On each bar it measures the distance between the close and each SuperTrend output, then groups
Lorentzian Classification is a machine learning indicator that applies a k-nearest neighbors algorithm using Lorentzian distance to analyze market patterns. It processes configurable technical indicators, including RSI, WaveTrend, CCI, and ADX, as feature vect
This indicator uses a Lorentzian distance k-nearest neighbors classification algorithm to predict market direction based on up to five technical features, such as RSI, WaveTrend, CCI, and ADX. It compares current feature values against historical bar patterns
An overlay indicator that applies a k-nearest-neighbors machine learning classifier using Lorentzian distance to predict price movement. It evaluates historical market features, such as RSI, WaveTrend, CCI, and ADX, to identify similar price-time patterns and
The Machine Learning Momentum Index uses a k-Nearest Neighbors classification algorithm to evaluate momentum and trend direction directly on the price chart. It records historical parameter pairs derived from weighted moving averages and smoothed RSI values, t
This indicator implements a k-nearest neighbours classification model to forecast price direction several bars ahead. It extracts three normalized technical features: RSI, an EMA spread scaled by ATR, and normalized candle range volatility. Historical samples