200W SMA Annual CAGR Tracker

307
A Pine Script indicator that calculates the annualized Compound Annual Growth Rate (CAGR) for either the weekly close price or the weekly 200-period Simple Moving Average (200W SMA). The script allows users to choose a custom lookback period expressed in years, months, or weeks, and it displays both the reference series and the computed CAGR as a chart label and an optional summary table.

Features:

Weekly reference series plotting:
200W SMA
Weekly close
Annual CAGR calculation over configurable lookback periods
Custom lookback unit: years, months, or weeks
Optional on-chart label with CAGR value
Optional table summary showing current value, past value, CAGR, and lookback duration
Use Case:
Ideal for long-term traders and investors who want a quick visual gauge of how the weekly trend or 200-week moving average has performed on an annualized basis. Great for comparing price momentum against a slow-moving trend benchmark.

How to Use:

Select the reference type: 200W or Weekly
Choose the lookback length and unit
Enable labels and/or the table for a cleaner visual summary
Apply to weekly or lower timeframes to view the weekly reference and CAGR overlay
Note:
This indicator uses historical weekly data with lookahead=barmerge.lookahead_off to avoid repainting.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.