OPEN-SOURCE SCRIPT
Mis à jour Match on Selectable Percentage Change + Range

Indicator Overview:
Match on Selectable Percentage Change + Range is a powerful analytical tool designed for traders and analysts who want to identify historical price bars that match a specific percentage variation, and then evaluate how price evolved in the following days. It combines precision filtering with visual tabular feedback, making it ideal for pattern recognition, backtesting, and scenario analysis.
What It Does
This indicator scans historical bars to find instances where the percentage change between two consecutive closes matches a user-defined target (± a customizable tolerance). Once matches are found, it displays:
The date of each match (most recent first)
The actual variation searched
The percentage change after 2, 10, 20, and 30 bars
The min-max range (in %) over those same periods
All results are shown in a dynamic table directly on the chart.
Inputs & Controls
Input Description
Which variation do you want to analyze? (%)
Set the target percentage change to look for (e.g. 2.5%)
% deviation from the variation to be considered (%) Define the tolerance range around the target (e.g. ±0.5%)
Bars to analyze (max 9999) Set how many past bars to scan
Show match table Toggle to enable/disable the entire table
Show percentage variations (2d, 10d, 20d, 30d) Toggle to show/hide post-match percentage changes
Show min-max ranges (2d, 10d, 20d, 30d) Toggle to show/hide post-match high/low ranges
Table Structure
Each row in the table represents a historical match. Columns include:
Date: When the match occurred
Variation in: The actual % change that triggered the match
2d / 10d / 20d / 30d: % change after those days
Min-Max 2d / 10d / 20d / 30d: Range of price movement after those days
Color coding helps quickly identify bullish (green) vs bearish (red) outcomes.
Use Cases
Backtesting: See how similar past moves evolved over time
Scenario modeling: Estimate potential outcomes after a known variation
Pattern recognition: Spot recurring setups or volatility clusters
Risk analysis: Understand post-variation drawdowns and upside potential
Tips for Use
Use tighter deviation (e.g. 0.3%) for precision, or wider (e.g. 1%) for broader pattern capture.
Combine with other indicators to validate setups (e.g. volume, RSI, trend filters).
Toggle off variation or range columns to focus only on the metrics you need.
Match on Selectable Percentage Change + Range is a powerful analytical tool designed for traders and analysts who want to identify historical price bars that match a specific percentage variation, and then evaluate how price evolved in the following days. It combines precision filtering with visual tabular feedback, making it ideal for pattern recognition, backtesting, and scenario analysis.
What It Does
This indicator scans historical bars to find instances where the percentage change between two consecutive closes matches a user-defined target (± a customizable tolerance). Once matches are found, it displays:
The date of each match (most recent first)
The actual variation searched
The percentage change after 2, 10, 20, and 30 bars
The min-max range (in %) over those same periods
All results are shown in a dynamic table directly on the chart.
Inputs & Controls
Input Description
Which variation do you want to analyze? (%)
Set the target percentage change to look for (e.g. 2.5%)
% deviation from the variation to be considered (%) Define the tolerance range around the target (e.g. ±0.5%)
Bars to analyze (max 9999) Set how many past bars to scan
Show match table Toggle to enable/disable the entire table
Show percentage variations (2d, 10d, 20d, 30d) Toggle to show/hide post-match percentage changes
Show min-max ranges (2d, 10d, 20d, 30d) Toggle to show/hide post-match high/low ranges
Table Structure
Each row in the table represents a historical match. Columns include:
Date: When the match occurred
Variation in: The actual % change that triggered the match
2d / 10d / 20d / 30d: % change after those days
Min-Max 2d / 10d / 20d / 30d: Range of price movement after those days
Color coding helps quickly identify bullish (green) vs bearish (red) outcomes.
Use Cases
Backtesting: See how similar past moves evolved over time
Scenario modeling: Estimate potential outcomes after a known variation
Pattern recognition: Spot recurring setups or volatility clusters
Risk analysis: Understand post-variation drawdowns and upside potential
Tips for Use
Use tighter deviation (e.g. 0.3%) for precision, or wider (e.g. 1%) for broader pattern capture.
Combine with other indicators to validate setups (e.g. volume, RSI, trend filters).
Toggle off variation or range columns to focus only on the metrics you need.
Notes de version
*day misalignment arrangementScript open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.