Loading…

Ehlers Elegant Oscillator

Ehlers' 2004 "Using The Inverse Fisher Transform" article applies the hyperbolic-tangent-shaped inverse transform to RSI, rescaled first into a roughly -1..+1 range, to turn a smooth oscillator into one that spends almost all its time near the extremes and crosses the middle in a sharp snap rather than a gradual drift. RSI's own 0-100 scaling is what makes it a suitable input in the first place - the transform needs something already in a sane, bounded range. Raw price momentum has no such natural bound, so this indicator builds its own bounded input first: it takes an N-bar momentum reading and divides it by that momentum's own rolling standard deviation, producing a z-score the way a statistical control chart would. That z-score - scaled down slightly so a typical reading lands inside the transform's sensitive range - is what feeds the inverse Fisher Transform. The result behaves like Ehlers' Fisher-of-RSI oscillator but is driven by a volatility- normalised momentum reading rather than RSI, which reacts to the size of a move relative to its own recent typical size instead of to the ratio of up-closes to down-closes. Notes and limitations - This is a derived, original combination of two of Ehlers' published techniques (the Inverse Fisher Transform and deviation-normalised momentum), not a reproduction of a single named Ehlers indicator - said plainly so it is not mistaken for a direct port of an existing formula. - The standard deviation window can occasionally sit very close to zero in a dead-flat market; the code treats that as an undefined z-score and outputs zero rather than dividing by a near-zero number. - Because the transform saturates smoothly rather than clipping hard, a reading pinned near +/-1 does not by itself say the move is over - only that recent momentum is well outside its own recent typical size. - Never repaints: every plotted value for a closed bar is final.

Indicator · MT4 · v1.0 · Free

About Ehlers Elegant Oscillator

Ehlers Elegant Oscillator is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Mom period, Norm period and Scale factor. MQL source code included.

Files in the download: EhlersElegantOscillator.ex4, EhlersElegantOscillator.mq4, EhlersElegantOscillator.txt.

Settings

SettingDefaultWhat it does
Mom period10Bars back for the raw momentum (Close[i] - Close[i-InpMomPeriod])
Norm period30Rolling window used to measure momentum's own standard deviation
Scale factor1.5Divides the z-score before the transform; higher = gentler swings
AlertstrueAlert once per closed bar on a zero-line cross

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: RSI · Momentum · Oscillator · Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria