Adaptive Trend Finder

Overview
Adaptive Trend Finder is a Pine Script v6 indicator for TradingView that visualizes adaptive regression channels across short, mid, and long horizons. For each horizon it selects the period with the highest Pearson’s R to the log of price, then draws a midline and deviation bands. Optional table rows summarize the selected period, a plain-language trend-fit label (from R), and an Annualized Price Change metric for daily/weekly charts (descriptive of historical price movement only).
How It Works
The indicator computes logarithmic linear regressions for short (~20–200 bars), mid (~200–1100 bars), and long (~300–1200 bars) horizons using built-ins like math.log and math.exp. For each horizon, it picks the candidate period with the highest Pearson’s R, then uses the slope, intercept, and standard deviation to plot:
• Midline (regression)
• Upper/lower bands (default multipliers: 2.0 / 2.5 / 3.0)
Channel color can follow price-action (close vs. previous close), direction (sign of slope), or a fixed color.
Key Features
• Adaptive channels: period auto-selection per horizon using Pearson’s R.
• Flexible visuals: configurable band multipliers, styles, and transparency.
• Readable stats: optional table for selected period, R-based trend-fit label, and Annualized Price Change (historical/descriptive; optional).
• Clean display: channels can extend left/right or not at all; table position and text size are configurable.
What It Displays
Three regression channels (short/mid/long) with configurable coloring, plus optional table rows describing the selected period and how closely the regression fits recent data (via R). This is a chart-visualization tool intended to help review historical trend behavior across timeframes.
Use Notes
Examples of chart review tasks include examining channel slope/width, noting where price interacts with bands, and comparing short vs. longer-term channels for context. This indicator does not generate signals or trade recommendations.
Configuration Notes
Adjust deviation multipliers (defaults: 2.0 / 2.5 / 3.0), line styles/colors, and toggle short/mid/long channels. Choose table position and contents. The Annualized Price Change row (if enabled) is shown on daily/weekly charts as a descriptive price metric—not a performance claim.
Originality
Original Pine v6 implementation using TradingView built-ins (math.log, math.exp, math.sqrt, math.pow).
Legal Disclaimer
For informational and educational purposes only—not investment, financial, or trading advice. Past results do not guarantee future outcomes; trading involves risk. Provided “as is,” without warranties. Use at your own risk.
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement TradingScriptSolutions.
TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.
Instructions de l'auteur
Clause de non-responsabilité
Script sur invitation seulement
Seuls les utilisateurs approuvés par l'auteur peuvent accéder à ce script. Vous devrez demander et obtenir l'autorisation pour l'utiliser. Celle-ci est généralement accordée après paiement. Pour plus de détails, suivez les instructions de l'auteur ci-dessous ou contactez directement TradingScriptSolutions.
TradingView ne recommande PAS de payer ou d'utiliser un script à moins que vous ne fassiez entièrement confiance à son auteur et que vous compreniez comment il fonctionne. Vous pouvez également trouver des alternatives gratuites et open-source dans nos scripts communautaires.