Ehlers Even Better Sinewave
Ehlers' earlier Sinewave Indicator reads the market's dominant cycle phase directly, which works well while price is genuinely cycling but can produce misleading, fast-flipping signals while price is instead trending hard - there is no real cycle for a phase reading to lock onto. The Even Better Sinewave addresses this at the filter-design level rather than by adding a trend filter on top: a one-pole highpass strips the slow trend/DC component out of price first, a two-pole SuperSmoother then removes the noise above the cycle band, and the surviving band-passed signal is divided by its own rolling three-bar RMS power before being plotted. That RMS normalisation is what gives the indicator its trend tolerance. During a strong sustained trend, the highpass-then-lowpass band contains comparatively little energy - there is no dominant cycle for it to capture - so the RMS-normalised output naturally stays close to zero rather than swinging wildly between manufactured highs and lows the way an un-normalised band-pass reading would. During a genuine cycling market, the band's own power rises and the normalised output swings cleanly toward its +/-1 bounds. Notes and limitations - This indicator estimates cycle presence and phase-like swing, it does not measure the cycle's actual period - that is a separate class of Ehlers indicator (dominant cycle / MESA-style measurement). - The two cutoff periods must stay clearly separated (InpLpPeriod well below InpHpPeriod); setting them close together starves the surviving band of any real content and the output degenerates toward noise. - Like any recursive two-stage filter, the first several bars after either period changes are a brief warm-up rather than a fully-formed reading, seeded at zero rather than left blank. - Never repaints: every plotted value for a closed bar is final.
Indicator · MT4 · v1.0 · Free
About Ehlers Even Better Sinewave
Ehlers Even Better Sinewave is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Hp period, Lp period and Alerts. MQL source code included.
Files in the download: EhlersEvenBetterSinewave.ex4, EhlersEvenBetterSinewave.mq4, EhlersEvenBetterSinewave.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Hp period | 40 | Highpass cutoff in bars (strips the trend/DC component out of price) |
| Lp period | 10 | SuperSmoother lowpass cutoff in bars (strips noise above the cycle band) |
| Alerts | false | Alert once per closed bar on a +/-0.5 threshold cross |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Buy/Sell Arrows · Trend · Alerts · MT4 Indicator · MQL4 Source Code