mesa_sine_wave
Function Name: mesa_sine_wave
Tags: MESA Sine Wave
Category: Cycles
The MESA Sine Wave was developed by John Ehlers and was introduced in his article in the November, 1996. The MESA Sine Wave indicator looks like a sine wave when the market is in a cycle mode and tends to wander when the market is in a trend mode.
The MESA Sine Wave indicator consists of two plots  one displaying the Sine of the measured phase angle over the time period parameter and the other the Sine of the phase angle advanced by 45 degrees (called the Lead Sine). Together, the crossings of the Sine and Lead Sine plots give clear advanced indication of cycle mode turning points.
When the MESA Sine wave indicator resembles an actual sine wave, this suggests the market is in a cycle mode. The indicator lines are not well structured when the market is in a trend mode. A buy signal is given when the Sine plot crosses above the Lead Sine plot. A sell signal is given when the Sine plot crosses below the Lead Sine plot. An obvious advantage that the MESA Sine wave indicator has over its "overbought/oversold" counterparts is that it enters and exits much more precisely without giving up a piece of the market's movement by waiting for confirmation.
This study plots the sine wave of the measured phase angle and the phase angle advanced by 45 degrees.
Parameters:
DominantCycle: Number of bars used for phase calculation.
AdvanceDegrees: Phase shift of the second sine wave (lead wave).
ShowTraderMarks, ShowSineWaves: Display control flags.
DominantCycle 


Default Value: 15  Minimum: 1  Maximum: 999 

Type: Numeric 
AdvanceDegrees 


Default Value: 45  Minimum: 180  Maximum: 180 

Type: Numeric 
ShowTraderMarks 


Default Value: 0 

Type: Boolean 
ShowSineWaves 


Default Value: 1 

Type: Boolean 