Loading…

Derivative Oscillator

A raw RSI whipsaws around the 30/70 lines constantly, which makes it a poor confirmation tool even though its underlying momentum reading is sound. Constance Brown's fix, published in "Technical Analysis for the Trading Professional", is to smooth the RSI itself with two EMA passes before doing anything else with it - not to widen the RSI's own lookback, which changes what it measures, but to smooth the finished RSI series the way a signal line smooths a MACD. The double-smoothed RSI is then compared against its own simple moving average, and the difference is plotted as a histogram. That histogram - not the smoothed RSI line by itself - is the actual Derivative Oscillator, and it is meant to be read as a momentum-of-momentum confirmation signal (is momentum itself accelerating or decelerating) rather than as another overbought/oversold level oscillator with fixed thresholds. The smoothed RSI line is plotted alongside it purely for context. Notes and limitations - The RSI's own Wilder average is seeded with a plain average of the first InpRsiPeriod gains/losses, exactly as Wilder's original method specifies, then recurses forward from there. - The signal line is a genuine simple moving average of the smoothed RSI, recomputed as a fresh windowed sum each bar rather than a running average, since Brown's published method calls for an SMA specifically, not another EMA stage. - Two EMA stages plus an SMA stage add real lag on top of the RSI's own lag; this is a slower, steadier signal than a raw RSI by design, not a faster one, and is not meant to catch the very first tick of a move.

Indicator · MT5 · v1.0 · Free

About Derivative Oscillator

Derivative Oscillator is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Rsi period, Ema1 period and Ema2 period. MQL source code included.

Files in the download: DerivativeOscillator.ex5, DerivativeOscillator.mq5, DerivativeOscillator.txt.

Settings

SettingDefaultWhat it does
Rsi period14Wilder RSI period
Ema1 period5First EMA smoothing period applied to RSI
Ema2 period3Second EMA smoothing period applied to Ema1
Signal sma9Simple-average length of the signal line
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 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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 · Moving Average · Momentum · Oscillator · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria