OPEN-SOURCE SCRIPT
Match Finder [theUltimator5]

Match Finder is the dating app of indicators. It takes your current ticker and finds the most compatible match over a recent time period. The match may not be Mr. right, but it is Mr. right now. It doesn't forecast future connection, but it tells you current compatibility for today.
Jokes aside, it is a pattern–comparison tool that was designed to find the ticker that tracks most closely to the one you are currently looking at. It scans a user-defined list of 40 tickers (pre-set to a bunch of liquid ETFs) and finds which one most closely matches the recent price action of the current chart over a fixed lookback window.
LOGIC BEHIND THE SCENES
For each bar, the script:
The use case of this indicator is to help you see which symbol has recently moved most similarly to your current chart, and how that shape looks when overlaid in the same panel. It helps you see which sectors it may be following most closely to.
Here is an image with arrows showing the elements of this indicator that will be mostly explained later.

USER INPUTS
1. Correlation Window Length
Default: 30
Range: 10–500
This is the number of bars used to compare the current symbol against each ticker.
Important - Larger values produce more “global” shape comparison but increase computational load and may cause the indicator to timeout if the length is too long
2. Drawing Mode
Options:
3. Show Correlation Table
When enabled (disabled by default), shows a table in the bottom-right of the chart that displays the correlation values over the lookback range for all 40 tickers. The best fit ticker is highlighted.
4. Best Fit Line Color
Color used to draw the overlaid best-match segment (yellow by default).
5. Ticker inputs (1–40)
The script always excludes the current chart’s symbol from being considered as its own best match.
NOTE: THIS INDICATOR IS EXTREMELY MEMORY INTENSIVE AND MAY TAKE SEVERAL SECONDS TO LOAD. PLEASE BE PATIENT AND GIVE THE INDICATOR UP TO 20 SECONDS FOR THE DATA TO DISPLAY
Jokes aside, it is a pattern–comparison tool that was designed to find the ticker that tracks most closely to the one you are currently looking at. It scans a user-defined list of 40 tickers (pre-set to a bunch of liquid ETFs) and finds which one most closely matches the recent price action of the current chart over a fixed lookback window.
LOGIC BEHIND THE SCENES
For each bar, the script:
- Takes the last N bars (Correlation Window Length) of the current symbol.
- Takes the last N bars of each selected comparison ticker.
- Calculates the Pearson correlation between the current symbol and each comparison ticker.
- Identifies the single best-matching ticker (highest positive correlation, excluding the current symbol itself).
- Rescales and overlays that matched segment on the chart so you can visually compare shapes.
- Optionally shows a correlation table with all tickers and their correlation values.
The use case of this indicator is to help you see which symbol has recently moved most similarly to your current chart, and how that shape looks when overlaid in the same panel. It helps you see which sectors it may be following most closely to.
Here is an image with arrows showing the elements of this indicator that will be mostly explained later.
USER INPUTS
1. Correlation Window Length
Default: 30
Range: 10–500
This is the number of bars used to compare the current symbol against each ticker.
Important - Larger values produce more “global” shape comparison but increase computational load and may cause the indicator to timeout if the length is too long
2. Drawing Mode
Options:
- Scale Only - Adjusts min and max of the plotted line segment to match the chart over the range
- Scale & Rotate - Scales as above, but matches the first and last point to the close of the chart over the range. This effectively rotates the pattern to force it to track the chart to an extent.
3. Show Correlation Table
When enabled (disabled by default), shows a table in the bottom-right of the chart that displays the correlation values over the lookback range for all 40 tickers. The best fit ticker is highlighted.
4. Best Fit Line Color
Color used to draw the overlaid best-match segment (yellow by default).
5. Ticker inputs (1–40)
- Default set to a broad universe of major ETFs (e.g., SPY, QQQ, IWM, sector and bond ETFs, commodities, etc.).
- You can replace these with any symbols supported by your data feed (stocks, ETFs, indexes, etc.).
The script always excludes the current chart’s symbol from being considered as its own best match.
NOTE: THIS INDICATOR IS EXTREMELY MEMORY INTENSIVE AND MAY TAKE SEVERAL SECONDS TO LOAD. PLEASE BE PATIENT AND GIVE THE INDICATOR UP TO 20 SECONDS FOR THE DATA TO DISPLAY
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.