OPEN-SOURCE SCRIPT
Two-Pole Oscillator [BigBeluga]

The Two-Pole Oscillator is an advanced smoothing oscillator designed to provide traders with precise market signals by leveraging deviation-based calculations combined with a unique two-pole filtering technique. It offers clear visual representation and actionable signals for smart trading decisions.
🔵Key Features:
- Two-Pole Filtering: Smooths out the main oscillator signal to reduce noise, providing a cleaner and more reliable view of market momentum and trend strength.
Pine Script® // Two-pole smooth filter function f_two_pole_filter(source, length) => var float smooth1 = na var float smooth2 = na alpha = 2.0 / (length + 1) if na(smooth1) smooth1 := source else smooth1 := (1 - alpha) * smooth1 + alpha * source if na(smooth2) smooth2 := smooth1 else smooth2 := (1 - alpha) * smooth2 + alpha * smooth1 - Deviation-Based Oscillator: Utilizes price deviations from the mean to generate dynamic signals, making it ideal for detecting overbought and oversold conditions.
Pine Script® float sma1 = ta.sma(close, 25) float sma_n1 = ((close - sma1) - ta.sma(close - sma1, 25)) / ta.stdev(close - sma1, 25) - Signal Gradient Strength: Signals on the main oscillator line feature gradient coloring based on their proximity to the 0 level:
➔ Closer to 0: More transparent, indicating weaker signals.➔ Closer to 1 or -1: Less transparent, highlighting stronger signals. - Level-Based Signal Validation: Parallel levels are plotted on the chart for each signal:
➔ If a level is crossed by price, the signal is invalidated, marked by an "X" at the invalidation point.
Trend Continuation - Invalidation Levels: Serve as potential stop-loss or trade-reversal zones, enabling traders to make more informed and disciplined trading decisions.
- Dynamic Chart Plotting: Signals are plotted directly on the chart with corresponding levels, providing a comprehensive visual representation for easy interpretation.
🔵How It Works:
- The oscillator calculates price deviation from a mean value and applies two-pole filtering to smooth the resulting signal.
- Gradient-colored signals reflect their strength, with transparency indicating proximity to the 0 level on the oscillator scale.
- Buy and sell signals are generated based on crossovers and crossunders of the oscillator line with a signal line.
- If a level is crossed, the corresponding signal is marked with a "X" plotted on the chart at the crossover point.
🔵Use Cases:
- Detecting overbought or oversold market conditions with a smoother, noise-free oscillator.
- Using invalidation levels to set clear stop-loss or trade exit points.
- Identifying strong momentum signals and filtering out weaker, less reliable ones.
- Combining oscillator signals with price action for more precise trade entries and exits.
This indicator is perfect for traders seeking a refined approach to oscillator analysis, combining signal strength visualization with actionable invalidation levels to enhance trading precision and strategy.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
🔵Gain access to our powerful tools : bigbeluga.com
🔵Join our free discord for updates : bigbeluga.com/discord
All scripts & content provided by BigBeluga are for informational & educational purposes only.
🔵Join our free discord for updates : bigbeluga.com/discord
All scripts & content provided by BigBeluga are for informational & educational purposes only.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
🔵Gain access to our powerful tools : bigbeluga.com
🔵Join our free discord for updates : bigbeluga.com/discord
All scripts & content provided by BigBeluga are for informational & educational purposes only.
🔵Join our free discord for updates : bigbeluga.com/discord
All scripts & content provided by BigBeluga are for informational & educational purposes only.
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。