OLPF - Octavio Low-Pass Filter Strategy

---
DESCRIPTION
The Octavio Low-Pass Filter (OLPF) is an advanced Finite Impulse Response (FIR) low-pass filter designed for financial time series analysis. It builds upon the foundational work of the New Low-Pass Filter (NLF) by Alex Pierrefeu, introducing three key enhancements that significantly improve signal quality and reduce common filtering artifacts.
---
KEY INNOVATIONS
1. HERMITE SMOOTHING POLYNOMIAL
Replaces the simple quadratic base (x²) with the cubic Hermite interpolation polynomial [x²(3-2x)]. This mathematical refinement provides C¹ continuity at kernel boundaries, ensuring smoother transitions and eliminating edge discontinuities that can introduce artificial noise into the filtered signal.
2. LANCZOS SIGMA FACTOR WINDOWING
Applies a Lanczos-type attenuation factor [sin(πi/N)/(πi/N)] to each harmonic component in the sine series. This windowing technique dramatically reduces the Gibbs phenomenon - the characteristic overshooting and ringing that occurs near sharp price transitions. The result is a cleaner signal with minimized false crossover signals.
3. ADAPTIVE WEIGHT NORMALIZATION
Implements dynamic normalization of kernel weights, guaranteeing that the sum of all filter coefficients equals unity. This ensures proper amplitude preservation across all market conditions and prevents signal drift or scaling artifacts.
---
MATHEMATICAL FOUNDATION
The OLPF kernel function is defined as:
K(x, N) = x²(3-2x) + Σ[i=1 to N] (1/i) × σ(i) × sin(πxi)
Where:
- x ∈ [0,1] is the normalized position within the filter window
- N is the filter order (degree of the sine series)
- σ(i) = sin(πi/(N+1)) / (πi/(N+1)) is the Lanczos sigma factor
The filter output is computed via discrete convolution:
F(M, N) = Σ[i=1 to M] src[i-1] × [K(i/M, N) - K((i-1)/M, N)] / W
Where W is the sum of all weights for normalization.
---
APPLICATIONS
- Trend identification with reduced lag compared to traditional MAs
- Noise reduction in volatile market conditions
- Generation of trading signals via fast/slow filter crossovers
- Foundation for more complex indicator development
---
STRATEGY IMPLEMENTATION
This script implements a dual-filter crossover strategy with:
- Fast OLPF for responsive signal generation
- Slow OLPF for trend confirmation
- EMA filter for additional trend validation
- ATR-based dynamic stop-loss positioning
- Risk-based position sizing (percentage of equity)
---
AUTHOR
Name: Hector Octavio Piccone Pacheco
Filter: Octavio Low-Pass Filter (OLPF)
Version: 1.0
Based on: New Low-Pass Filter (NLF) by Alex Pierrefeu
Date: 2025
Original Contributions:
- Hermite smoothing polynomial kernel base
- Lanczos sigma factor windowing for Gibbs reduction
- Adaptive weight normalization system
- Integrated risk management framework
---
LICENSE
This work is licensed under the Mozilla Public License 2.0. You are free to use, modify, and distribute this code with attribution.
---
DISCLAIMER
Trading involves substantial risk of loss. This indicator is provided for educational and research purposes only. Past performance does not guarantee future results. Always conduct your own analysis and risk assessment.
Yalnızca davetli komut dosyası
Bu komut dosyasına yalnızca yazar tarafından onaylanan kullanıcılar erişebilir. Kullanmak için izin istemeniz ve almanız gerekir. Bu genellikle ödeme yapıldıktan sonra verilir. Daha fazla ayrıntı için aşağıdaki yazarın talimatlarını izleyin veya doğrudan octa_piccone ile iletişime geçin.
TradingView, yazarına tamamen güvenmediğiniz ve nasıl çalıştığını anlamadığınız sürece bir komut dosyası için ödeme yapmanızı veya kullanmanızı TAVSİYE ETMEZ. Ayrıca topluluk komut dosyalarımızda ücretsiz, açık kaynaklı alternatifler bulabilirsiniz.
Yazarın talimatları
Feragatname
Yalnızca davetli komut dosyası
Bu komut dosyasına yalnızca yazar tarafından onaylanan kullanıcılar erişebilir. Kullanmak için izin istemeniz ve almanız gerekir. Bu genellikle ödeme yapıldıktan sonra verilir. Daha fazla ayrıntı için aşağıdaki yazarın talimatlarını izleyin veya doğrudan octa_piccone ile iletişime geçin.
TradingView, yazarına tamamen güvenmediğiniz ve nasıl çalıştığını anlamadığınız sürece bir komut dosyası için ödeme yapmanızı veya kullanmanızı TAVSİYE ETMEZ. Ayrıca topluluk komut dosyalarımızda ücretsiz, açık kaynaklı alternatifler bulabilirsiniz.