PROTECTED SOURCE SCRIPT

Wave Surge [sma]

52
Overview
Wave Surge is indicator that visualizes market waves through dynamic price oscillations around a moving average baseline. It combines wave analysis with RSI filtering to identify trend strength and potential reversals.

How It Works

Core Calculation
The indicator calculates a wave pattern by:
1. Computing a baseline using the average of highest/lowest prices over the specified period
2. Determining a keltner-style center point between this baseline and price SMA
3. Creating a linear regression of the price deviation from this center
4. Generating an adaptive signal line that responds to crossover events

Visual Components
- **Base MA Line**: A moving average (SMA or EMA) that changes color based on RSI zones
- Cyan overlay: RSI is overbought (default >70)
- Yellow overlay: RSI is oversold (default <30)
- Gray: Neutral RSI zone

- Wave Fill: The dynamic area between the MA and wave level
- Green shades: Bullish momentum (wave > 0)
- Red/Orange shades: Bearish momentum (wave < 0)
- Color intensity indicates wave strength (accelerating vs decelerating)


Key Features
- Wave Intensity Control: Adjustable parameter (0.1-2.0) to control wave amplitude
- MA Type Selection: Choose between SMA or EMA for the baseline
- RSI Integration: Hidden RSI filter adds context to the moving average color
- Adaptive Signal: The signal line dynamically adjusts to crossover events
- Fully Customizable Colors: All visual elements can be customized


Originality Statement
This indicator uses a unique combination of:
- Custom wave calculation based on price deviation from keltner-style center
- Linear regression applied to normalized price distance
- Adaptive signal line that recalculates on wave direction changes
- Multi-layered RSI integration for contextual MA coloring

The wave fill visualization creates a dynamic oscillating band that responds to both momentum strength and direction changes.

For educational purposes only. Not financial advice.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.