MESA Sine Wave (MSW)

Parameters: period = 20 (10–50)

Overview

The MESA Sine Wave represents John Ehlers' groundbreaking application of digital signal processing to financial markets, introduced in his 2001 work "Rocket Science for Traders." Based on the principle that markets exhibit cyclical behavior similar to natural phenomena, the indicator employs Fourier analysis and phase calculations to extract the dominant market cycle. Unlike traditional oscillators that lag price action, MESA Sine Wave anticipates turning points by generating two plots: the Sine Wave representing the current phase angle, and the Lead Wave advanced by 45 degrees, creating a predictive element that gives traders crucial early warning of potential reversals.

What makes the MESA Sine Wave unique is its ability to adapt between two distinct market modes. In cycle mode, the two lines form clear sine wave patterns, oscillating smoothly around zero and providing reliable crossover signals. In trend mode, the lines flatten and run parallel, wandering sideways near zero - a clear indication to avoid cycle-based trades and switch to trend-following strategies. This dual nature solves a fundamental problem in technical analysis: knowing when to apply cycle analysis versus trend analysis. The indicator's advanced mathematics, including phase angle calculations and dominant cycle measurements, work behind the scenes to deliver simple, actionable signals.

Interpretation & Trading Signals

Cycle Mode Signals:

  • Sine Crosses Above Lead: Buy signal in cycle mode
  • Sine Crosses Below Lead: Sell signal in cycle mode
  • Clear Sine Pattern: Market is cycling, use crossovers
  • Anticipatory Nature: Signals come before price turns

Market Mode Identification:

  • Smooth Sine Waves: Cycle mode active, oscillator trades work
  • Flat/Parallel Lines: Trend mode, avoid cycle signals
  • Lines Near Zero: Strong trending market conditions
  • Mode Transition: Lines changing from sine to flat pattern

Trading Applications:

  • Zero Line Cross: Early signals for potential trend shifts
  • Extreme Values: Price exhaustion, reversal zones
  • Multi-Timeframe: Apply to intraday, daily, weekly charts
  • Filter Whipsaws: Trend mode recognition reduces false signals

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators