OPEN-SOURCE SCRIPT

Adaptive Log Trend Channel

96
One-line Summary / 一句话简介

EN: Adaptive log-scale trend channel using Pearson-optimized regression and deviation bands.
中文:基于皮尔逊优化回归的自适应对数趋势通道,带标准差波动带。

Full Description / 完整介绍
What it does / 功能

EN: This indicator fits a log-linear regression to price and builds a trend channel with ±k·σ deviation bands. It automatically selects the period with the highest Pearson correlation (R), ensuring the channel best matches the dominant market trend.
中文:该指标通过价格的对数线性回归拟合趋势,并在中线上下绘制 ±k·σ 偏差通道。它会自动选择皮尔逊相关系数 (R) 最高的周期,从而保证通道与主要趋势最贴合。

Why it’s useful / 适用价值

EN:

Naturally fits assets with multiplicative growth (crypto, tech stocks).

Adapts dynamically to different market regimes.

Provides CAGR estimates on Daily/Weekly charts for trend strength evaluation.

中文:

自然适用于呈现乘法增长的资产(如加密货币与科技股)。

可动态适应不同的市场阶段。

在日线/周线图上提供 趋势年化收益率 (CAGR),帮助评估趋势强度。

How it works / 工作原理

EN:

Computes log(price) → regression slope & intercept.

Draws a midline (log regression projection).

Upper & lower bands = ±k·σ in log space.

Info panel shows: Auto-Selected Period, Trend Strength (or Pearson’s R), and CAGR.

中文:

对价格取对数 → 计算回归斜率与截距。

绘制 中线(对数回归投影)。

上下轨 = 对数空间中的 ±k·σ。

信息面板显示:自动选择周期、趋势强度(或皮尔逊 R 值)、以及 CAGR 年化收益率。

Key Settings / 主要参数

EN:

Long-Term Mode: Uses extended periods (300–1200).

Deviation Multiplier (k): Controls channel width (default 2.0).

Styles: Colors, line type, and extension.

Panel Options: Toggle auto-period, Pearson’s R, and CAGR.

中文:

长期模式:采用更长周期 (300–1200)。

偏差倍数 (k):控制通道宽度(默认 2.0)。

样式:可设置颜色、线型、延长方式。

信息面板:可开关自动周期、皮尔逊 R、CAGR。

Notes / 注意事项

EN:

CAGR is only available on Daily/Weekly timeframes.

Regression-based tools may repaint as new bars form; treat it as context, not signals.

中文:

CAGR 仅在日线与周线周期可用。

回归类指标在新K线形成时可能重绘,仅用于趋势参考而非交易信号。

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.