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.
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie TradingScriptSolutions direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.
Hinweise des Autors
Haftungsausschluss
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie TradingScriptSolutions direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.