OPEN-SOURCE SCRIPT
已更新 Adaptive Causal Wavelet Trend Filter

The Adaptive Causal Wavelet Trend Filter is a technical indicator implementing causal approximations of wavelet transform properties for better trend detection with adaptive volatility response.
The Adaptive Causal Wavelet Trend Filter (ACWTF) applies mathematical principles derived from wavelet analysis to financial time series, providing robust trend identification with minimal lag. Unlike conventional moving averages, it preserves significant price movements while filtering market noise through signal processing that i describe below.
I was inspired to build this indicator after reading "Wavelet-Based Trend Identification in Financial Time Series" by In, F., & Kim, S. 2013 and reading about Mexican Hat wavelet filters.
The ACWTF maintains optimal performance across varying market regimes without requiring parameter adjustments by adapting filter characteristics to current volatility conditions.
Mathematical Foundation
Inspired by the Mexican Hat wavelet (Ricker wavelet), this indicator implements causal approximations of wavelet filters optimized for real-time financial analysis. The multi-resolution approach identifies features at different scales and the adaptive component dynamically adjusts filtering characteristics based on local volatility measurements.
Key mathematical properties include:
Filter Methods
Practical Applications
The comprehensive information panel provides:
Implementation Notes
The Adaptive Causal Wavelet Trend Filter (ACWTF) applies mathematical principles derived from wavelet analysis to financial time series, providing robust trend identification with minimal lag. Unlike conventional moving averages, it preserves significant price movements while filtering market noise through signal processing that i describe below.
I was inspired to build this indicator after reading "Wavelet-Based Trend Identification in Financial Time Series" by In, F., & Kim, S. 2013 and reading about Mexican Hat wavelet filters.
The ACWTF maintains optimal performance across varying market regimes without requiring parameter adjustments by adapting filter characteristics to current volatility conditions.
Mathematical Foundation
Inspired by the Mexican Hat wavelet (Ricker wavelet), this indicator implements causal approximations of wavelet filters optimized for real-time financial analysis. The multi-resolution approach identifies features at different scales and the adaptive component dynamically adjusts filtering characteristics based on local volatility measurements.
Key mathematical properties include:
- Non-linear frequency response adaptation
- Edge-preserving signal extraction
- Scale-space analysis through dual filter implementation
- Volatility-dependent coefficient adjustment, which I love
Filter Methods
- Adaptive: Implements a volatility-weighted combination of multiple filter types to optimize the time-frequency resolution trade-off
- Hull: Provides a causal approximation of wavelet edge detection properties with forward-projection characteristics
- VWMA: Incorporates volume information into the filtering process for enhanced signal detection
- EMA Cascade: Creates a multi-pole filter structure that approximates certain wavelet scaling properties
Suggestion: try all as they will provide slightly different signals. Try also different time-frames.
Practical Applications
- Trend Direction Identification: Clear visual trend direction with reduced noise and lag
- Regime Change Detection: Early identification of significant trend reversals
- Market Condition Analysis: Integrated volatility metrics provide context for current market behavior
- Multi-timeframe Confirmation: Alignment between primary and secondary filters offers additional confirmation
- Entry/Exit Timing: Filter crossovers and trend changes provide potential trading signals
The comprehensive information panel provides:
- Current filter method and trend state
- Trend alignment between timeframes
- Real-time volatility assessment
- Price position relative to filter
- Overall trading bias based on multiple factors
Implementation Notes
- Log returns option provides improved statistical properties for financial time series
- Primary and secondary filter lengths can be adjusted to optimize for specific instruments and timeframes
- The indicator performs particularly well during trend transitions and regime changes
- The indicator reduces the need for using additional indicators to check trend reversion
發行說明
Updated from Pine 5 to Pine 6. 開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。