Skip to content
All library documents

Adaptive Log-Price Trend Channels Selected by Pearson Correlation

Article TradingView scripts

Summary

This indicator fits linear trends to logarithmic prices across a set of candidate lookback periods, then selects the period with the highest Pearson correlation. It draws the fitted midline and upper and lower channel boundaries, with channel width based on the regression residual standard deviation and a user-selected multiplier. Separate short-term and long-term period ranges can be chosen.

A chart table can report the selected period, a qualitative trend-strength label or Pearson’s R, and annualized return. The return display is limited to daily and weekly timeframes and uses asset-type-specific annualization assumptions. The document describes how the indicator calculates and displays these measures, but supplies no performance test or evidence that correlation predicts future returns. Selecting the strongest fit among many periods can favor a historical pattern that may not persist; the channel and statistics are descriptive tools rather than a complete trading system.

Key ideas

  • The indicator compares regression fits over multiple candidate lookback periods and selects the one with the highest Pearson correlation.
  • It applies linear regression to logarithmic prices and estimates channel width from the residual standard deviation.
  • The channel can use short-term or long-term period ranges, with adjustable display and width settings.
  • Pearson correlation is presented as a measure of historical fit, while the annualized return display is restricted to daily and weekly charts.
  • The document provides no backtest evidence that the selected trend will continue.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.