Scalping Trend Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

The scalping trend indicator draws one rail and colours it. While the quick average sits above the slow one, the rail is lime. Drop below and it turns red. The arrows mark the bar that switch happened, so a glance tells you both the current lean and where it began.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 4: Scalping Trend Up, Scalping Trend Down, Scalping Buy, Scalping Sell
Alerts popup, push notification, email, sound
Inputs 12

What the Scalping trend Indicator draws on the chart

Four plots, all on the price chart.

`Scalping Trend Up` paints the rail lime.

`Scalping Trend Down` paints the same rail red.

`Scalping Buy` uses arrow 233 in lime.

`Scalping Sell` uses arrow 234 in red.

The rail itself is the slow average line.

  • Scalping Trend Up: line, lime, width 2
  • Scalping Trend Down: line, red, width 2
  • Scalping Buy: arrow, lime, width 2, arrow code 233
  • Scalping Sell: arrow, red, width 2, arrow code 234
scalping trend indicator: The coloured rail and a cross arrow on EURUSD H1.
The coloured rail and a cross arrow on EURUSD H1.

How the Scalping trend Indicator calculates its values

Two averages

Both built in the file. `FastPeriod` `8` and `SlowPeriod` `21` carry forward one bar at a time. The slow one doubles as the rail you see.

Colouring the rail

Position decides it. Whichever buffer holds the value that bar decides the colour. The code writes the previous bar too, which is what stops a gap where the colour changes.

The mark

A cross prints one arrow. `MomPeriod` `5` measures the move over five bars, and `MomThreshold` `0.0` lets everything through by default. `CooldownBars` `3` spaces same-side marks.

How to read the signals

Rail colour is the current lean, nothing more.

An arrow marks where that lean changed.

A long single-colour run is a trend leg.

Rapid colour changes describe a range.

`ArrowGapMult` `0.6` scales the mark to the bar range.

Raising `MomThreshold` demands a real push.

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

`EnableAlerts` heads the cross alerts and arrives true with `EnablePopup`. Switch `EnablePushNotify` for a phone, `EnableEmail` for mail, or `EnableSound` to play `SoundFile`. Those three start off and every message waits for a close.

Every Scalping trend Indicator input

Core settings

Setting What it does Default
FastPeriod Fast EMA period. Quick average, `8`. 8
SlowPeriod Slow EMA reference period. Slow average and the rail, `21`. 21
MomPeriod Momentum lookback (bars). Bars in the push check, `5`. 5
MomThreshold Min momentum in points (0 = permissive). Points of push required, `0.0`. 0.0
CooldownBars Bars between arrows of same side. Quiet bars after a mark, `3`. 3

Display settings

Setting What it does Default
ArrowGapMult Arrow offset as fraction of bar range. Mark gap as a share of range, `0.6`. 0.6

Alert settings

Setting What it does Default
EnableAlerts Master switch, `true`. on
EnablePopup Box in the terminal, `true`. on
EnablePushNotify (see inputs panel) off
EnableEmail Mail on a cross, `false`. off
EnableSound (see inputs panel) off
SoundFile Which clip plays, `”alert.wav”`. alert.wav
scalping trend indicator: Inputs panel with FastPeriod, MomPeriod and MomThreshold.
Inputs panel with FastPeriod, MomPeriod and MomThreshold.

Settings that fit your chart

An eight and twenty-one pair changes colour often enough to be useful intraday. EURUSD M15 is a natural home. Colour flips come several times a session there. On H1 each run is a real leg. On H4 they are rare.

When the Scalping trend Indicator fails

The rail is an average, so it lags price.

A zero threshold lets every small cross through.

In a range the colour flips constantly.

The rail sits where the slow average is, not at any level.

Copy the compiled Scalping trend 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.

Download the Scalping trend Indicator for MT4 and MT5

The zip holds the compiled Scalping trend 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

What does MomThreshold 0.0 let through?

Every cross. The default asks for no minimum push at all, so the momentum check is effectively off until you raise it. Setting a value in points is the first adjustment worth making on a noisy chart.

Why does SlowPeriod 21 double as the rail?

Because it keeps the chart simple. Rather than drawing a separate line, the tool colours the slow average itself, so one line carries both the average and the current lean.

How does ArrowGapMult 0.6 place a mark?

It takes six tenths of the bar’s own range as the gap. On a wide bar the arrow sits further out, which keeps it clear of the candle without needing a fixed point setting per symbol.

Does the rail colour repaint?

The colour of a finished bar stays put, because it comes from two averages of closed prices. The bar still forming can change colour until it closes, as any average-based rail will.

Are results guaranteed?

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

Category: this is part of our Trend collection. Browse more Trend 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