Categories

Glitch Index is a free MT5 oscillator by mladen that plots in its own sub-window as a colored histogram and matching line, measuring how far price has stretched away from a momentum-adjusted moving average, expressed as a clean percentage. It’s an instant download built for traders who want a quick visual read on when a move has gone further than its recent average would suggest.
What the Formula Is Actually Doing
The core building block is a custom incremental SMA (iSma) calculated over the inpSmaPeriod input (default 30). But instead of comparing price directly to that SMA, the indicator first calculates rocSma — the bar-over-bar change in the SMA, multiplied by 0.1 and added to 1.0. That produces a small multiplier that sits close to 1.0 but nudges upward when the SMA is rising and downward when the SMA is falling. This multiplier is then applied to the SMA itself (sma[i] * rocSma) to produce a momentum-adjusted average, rather than using the raw SMA.
The distance between the actual close and that momentum-adjusted average is then converted into a percentage of the current close: (close - smaMul) / close * 100. That percentage is the Glitch Index value plotted both as the histogram and the line. Two threshold inputs, inpLevel1 (default 2) and inpLevel2 (default 5), split the reading into five color zones — a neutral zone near zero, two “elevated” zones beyond Level 1, and two “extreme” zones beyond Level 2 — with matching horizontal level lines drawn on the sub-window at +Level2, +Level1, 0, -Level1, and -Level2 so you can see at a glance how far the current reading sits from those thresholds.
How to Read It
- Near zero — price is tracking close to its own momentum-adjusted average; there’s no meaningful stretch in either direction.
- Beyond +/-Level1 — price has moved a moderate amount away from its adjusted average in that direction, shown in the first pair of color zones.
- Beyond +/-Level2 — an extreme reading, shown in the outer pair of colors, flagging a move that has stretched well past what the recent average and its own momentum would predict.
- Histogram vs. line — both plots carry the exact same value and coloring; the histogram gives a quick visual sense of magnitude while the line makes it easier to track the reading’s slope over time.
Input Parameters (Actual Defaults From the Code)
- inpSmaPeriod = 30 — the period of the underlying SMA that the momentum adjustment and price-distance calculation are both built on.
- inpLevel1 = 2 — the inner threshold (in percent) marking a moderate reading; also drawn as a horizontal level line at +/-2.
- inpLevel2 = 5 — the outer threshold (in percent) marking an extreme reading; also drawn as a horizontal level line at +/-5.
Where This Fits in a Trading Plan
Because the reading is scaled directly to price rather than bounded like an RSI, Glitch Index tends to work best as a per-symbol overbought/oversold gauge that you recalibrate rather than a universal setting you apply unchanged across every chart. Traders looking for mean-reversion setups can watch for the histogram to reach the outer Level2 zone and then start easing back toward zero as an early sign the stretch is unwinding, while trend traders might instead use repeated moderate Level1 readings in one direction as confirmation that a trend has real momentum behind it rather than fading fast. Either use case benefits from watching the line’s slope, not just its absolute color zone, since a reading that is extreme but still climbing tells a different story than one that has already turned.
Honest Limitations
The rocSma multiplier only applies a fairly gentle 10% weighting to the SMA’s own rate of change, so on very fast-moving markets the “momentum adjustment” will lag noticeably behind the actual acceleration of price. Because the oscillator’s value is a percentage of the current close, the same absolute price move will produce different Glitch Index readings on instruments or pairs with very different price levels, so the default Level1/Level2 thresholds of 2 and 5 will need recalibrating per-symbol rather than used as universal constants. There is also no built-in signal line, divergence detection, or smoothing of the oscillator itself — what you see is the raw percentage reading, colored by threshold, with no additional filtering layer.
- inpSmaPeriod (default 30) — Period of the underlying SMA used for both the momentum adjustment and the price-distance calculation.
- inpLevel1 (default 2) — Inner percentage threshold marking a moderate reading; also drawn as a horizontal level line.
- inpLevel2 (default 5) — Outer percentage threshold marking an extreme reading; also drawn as a horizontal level line.
FAQs About the MT4 Glitch Index Indicator MT5
Does the Glitch Index indicator repaint?
No. It uses MT5’s standard forward-only recalculation pattern, recomputing just the current forming bar plus any new bars using only that bar and the one before it, so completed readings on the histogram and line do not change afterward.
What do Level1 and Level2 actually represent?
They’re percentage thresholds (defaults 2 and 5) applied to the oscillator’s own value — the distance between close and a momentum-adjusted SMA, expressed as a percent of close — and they control both the histogram/line coloring and the five horizontal level lines drawn in the sub-window.
What is the rocSma adjustment for?
It’s a small multiplier built from the SMA’s own bar-over-bar rate of change (weighted at 10%) that nudges the moving average up when it’s rising and down when it’s falling, so the oscillator measures price distance from a momentum-tilted average rather than a plain static SMA.
How is this different from a standard RSI or CCI?
Rather than a bounded 0-100 or unbounded standard-deviation scale, Glitch Index expresses the reading as a direct percentage of the current close relative to a momentum-adjusted moving average, so its scale is tied to the instrument’s own price level and needs its own threshold calibration.
What timeframes or pairs suit this indicator?
Because the reading is a percentage of price, it works across timeframes and instruments, but the default Level1/Level2 thresholds of 2 and 5 were not tuned to any specific symbol and should be adjusted per-instrument for a meaningful overbought/oversold read.
Glitch Index Indicator MT5
Glitch Index is a free MT5 oscillator by mladen that plots in its own sub-window as a colored histogram and matching line, measuring how far price has stretched away from a momentum-adjusted moving average, expressed as a clean percentage. It's an instant download built for traders who want a quick visual read on when a…
Download the Glitch Index Indicator MT5