OPEN-SOURCE SCRIPT
Cập nhật

Adaptive Weighted Regression Channel (AWRC)

290
Short Description:
The Adaptive Weighted Regression Channel (AWRC) is an advanced technical analysis tool that plots a dynamic regression channel based on the recent price action. The centerline is a linear regression (trendline) fitted to the selected price source over a rolling window. The channel boundaries are placed above and below the regression line by a user-selected multiple of the weighted standard deviation.
What makes AWRC unique is its ability to optionally weight each bar’s importance in the regression using Volume, ATR (Average True Range), or Recency Decay, offering a channel that can adapt to market volatility, participation, or trend acceleration.

Parameter Explanations:
length: Number of bars for the regression window (how many recent candles are included). Higher values = smoother, less sensitive channel.
StdDev Multiplier (mult): Controls the channel width. 2.0 is classic; higher = wider channels, lower = tighter.
Enable Weighting?: Turn ON to activate weighting of each bar. If OFF, all bars are equally weighted (classic regression channel).
Weight Type: Select what to use for weights (only active if Enable Weighting is ON):
  1. "Volume": Higher volume bars have more influence on the regression.
  2. "ATR": Bars with higher volatility (as measured by ATR) have more influence.
  3. "Decay": More recent bars are given more weight (controlled by Decay parameter).

Decay: If Weight Type is "Decay", this controls the rate of recency decay. (e.g. 0.98 = slow decay; 0.90 = fast decay; values close to 1 mean a longer memory.)
Source for the calculation (src): Selects which price is regressed. Default is hl2 (average of high and low); you can choose close, open, etc.

Recommended Parameters:
For general use: length = 34, mult = 2.0, Enable Weighting = OFF, src = hl2
For volume-aware channel: Enable Weighting = ON, Weight Type = "Volume"
For volatility sensitivity: Enable Weighting = ON, Weight Type = "ATR"
For extra focus on recent price: Enable Weighting = ON, Weight Type = "Decay", Decay = 0.95 or 0.98
For swing trading: length = 21–55, mult = 1.5–2.5
For intraday/scalping: length = 10–20, mult = 1.0–1.5


Usage Tips:

  • The regression line shows the "best fit" trend for the selected window.
  • The channel captures the typical range; price breaking outside the channel can signal strength, exhaustion, or breakout.
  • Volume and ATR weighting help the channel adapt to market participation or volatility spikes.
  • Decay weighting locks onto the most recent trend direction quickly.
  • Adjust parameters to fit your timeframe and market volatility.
  • Use AWRC to spot trending moves, reversals, or overextensions.


Try different weighting and channel settings to match your trading style!
Phát hành các Ghi chú
update:
added alerts:
1. when price touches upper trend line
2. when price touches lower trend line
3. when price crosses (down or up) the middle line.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.