Momentum Alert Indicator: A Ratio Around 100

Written by Dominic Walsh · Published · Last updated

The momentum alert indicator compares the current close against the close a set number of bars back and expresses it as a ratio. A reading of 100 means price is exactly where it was. Momentum plots that ratio, Smoothed follows it more calmly, and ZeroRef marks the 100 line.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 100 / 102 / 98)
Plots 3: Momentum, Smoothed, ZeroRef
Alerts popup, push notification, email, sound
Inputs 12

What the Momentum alert Indicator draws on the chart

Momentum is the raw ratio, close divided by the close MomentumPeriod bars back, times a hundred.

Smoothed is that ratio averaged over SmoothPeriod bars.

ZeroRef holds a flat 100 line, which is the neutral reading for a ratio.

Levels also cross the pane at 100.0, 102.0 and 98.0, matching UpperLevel and LowerLevel.

Marker objects appear on the price chart when ShowChartArrows stays on.

  • Momentum: line, dodger blue, width 2
  • Smoothed: line, orange, width 2
  • ZeroRef: hidden buffer
EURUSD H1 pane: the momentum alert indicator with Momentum pushing above the 102.0 level.
EURUSD H1 pane: the momentum alert indicator with Momentum pushing above the 102.0 level.

How the Momentum alert Indicator calculates its values

The ratio

The code divides the current close by the close MomentumPeriod bars back and multiplies by a hundred. A rise of two percent over that window reads 102.

When the older close reads zero the code returns 100 rather than dividing by nothing, which keeps the pane from breaking on bad data.

Smoothing it

The smoothed line seeds with a simple average of the first SmoothPeriod raw values. It then switches to an exponential recursion.

Seeding with a real average rather than one value keeps the line clean. A single seed leaves a distortion that takes many bars to clear.

Why 100 rather than 0

This build expresses momentum as a ratio, so neutral sits at 100. A subtraction based version would put neutral at zero instead.

That is why ZeroRef holds 100 despite its name. It is also why UpperLevel and LowerLevel sit at 102.0 and 98.0.

How to read the signals

A reading of 102 means price sits two percent above where it was MomentumPeriod bars ago.

The gap between Momentum and Smoothed widens when the move accelerates.

Crossings of the 100 line mark where price returned to its level from the lookback window.

Because it is a ratio, readings are directly comparable across instruments in percentage terms.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

Alerts cover popup, push, email and sound when the reading passes a level. A bar time check keeps it to one alert per closed bar.

Every Momentum alert Indicator input

Core settings

Setting What it does Default
MomentumPeriod Momentum lookback (close/close[N]*100). MomentumPeriod is how many bars back the comparison reaches. It defaults to 14. 14
SmoothPeriod EMA smoothing of the momentum. SmoothPeriod averages the raw ratio into the second line, 5 by default. 5
UpperLevel Overbought reference. UpperLevel is the upper reference at 102.0, meaning two percent above neutral. 102.0
LowerLevel Oversold reference. LowerLevel is the matching floor at 98.0. 98.0

Display settings

Setting What it does Default
ShowChartArrows Draw BUY/SELL arrows on price chart. ShowChartArrows adds markers on the price chart as well as the pane. It defaults to true. on
ArrowOffsetPts Distance from candle in points. ArrowOffsetPts spaces those chart markers away from the candles, 12 points by default. 12

Alert settings

Setting What it does Default
EnableAlerts (see inputs panel) on
EnablePopup (see inputs panel) on
EnablePushNotify (see inputs panel) off
EnableEmail (see inputs panel) off
EnableSound (see inputs panel) on
SoundFile (see inputs panel) alert.wav
Inputs panel for the momentum alert indicator showing MomentumPeriod, SmoothPeriod and UpperLevel.
Inputs panel for the momentum alert indicator showing MomentumPeriod, SmoothPeriod and UpperLevel.

Settings that fit your chart

The screenshot uses EURUSD H1. A two percent band is wide for a major pair on H1 and narrow for a volatile instrument. So the levels are the first thing to adjust when you change market. H1 and H4 hold a side long enough to act on.

When the Momentum alert Indicator fails

The reading compares two closes and ignores everything between them. A wild round trip that ends where it started reads exactly neutral.

UpperLevel and LowerLevel are fixed percentages, so the same pair of levels suits one instrument and not another.

A ratio has no upper bound, so an extreme reading on a volatile day can dwarf the level lines and squash the pane scale.

The smoothed line lags the raw one by construction, so crossings between them arrive after the move that caused them.

Copy the compiled Momentum alert Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Background reading on the method behind the Momentum alert Indicator: Payment schedule on Wikipedia, Multicollinearity at StockCharts ChartSchool.

Download the Momentum alert Indicator for MT4 and MT5

The zip holds the compiled Momentum alert Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why does ZeroRef sit at 100 rather than 0?

This build works as a ratio: the current close divided by the close MomentumPeriod bars back, times a hundred. Unchanged price gives exactly 100. A subtraction version would put neutral at zero, with its levels either side of that.

What does UpperLevel 102.0 represent?

Price sitting two percent above where it was MomentumPeriod bars ago. That is a wide move for a major pair on an intraday chart and a modest one for a volatile instrument. So the levels are usually the first thing to adjust.

Why does the Smoothed line seed with a simple average?

Seeding an exponential recursion with one value lets that reading dominate the early line. A simple average of the first SmoothPeriod raw values gives a sounder start. The line then settles within a few bars.

Does a Momentum reading of 100 mean nothing happened?

It means price finished where it was MomentumPeriod bars ago. Plenty may have happened in between, because the comparison only looks at two closes and ignores everything between them. A wild round trip reads exactly the same as a flat stretch.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Momentum alert Indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment