The name sets up a comparison the code does not make. The scalping vs swing trading indicator has one signal: a five-bar stochastic position crossing its own short average. Two inputs govern it, two arrows report it, and the pace those five bars produce is firmly the scalping end.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 2: Scalping Buy, Scalping Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 8 |
On the chart: plots and colours
Two arrow plots, on the price chart.
`Scalping Buy` prints coral using arrow 233.
`Scalping Sell` prints yellow using arrow 234.
Both sit half a bar range from the candle.
No line and no pane appear anywhere.
The reading behind them stays hidden.
- Scalping Buy: arrow, coral, arrow code 233
- Scalping Sell: arrow, yellow, arrow code 234

How the Scalping vs swing trading Indicator reaches a value
Position in the range
`KPeriod` `5` sets the window. The highest high and lowest low across it bound the bar, and the close’s position between them becomes a figure from zero to a hundred.
The smoothing pass
`DPeriod` `3` names the second series. It weights the previous value twice against the current one, which is a fast blend rather than a plain three-bar average.
The crossing
Two bars decide the arrow. The main figure moving from at or below its blend to above prints coral, and the mirrored move prints yellow.
How to use what it draws
Coral marks the upward crossing, while yellow marks the downward.
Arrow distance follows the size of the bar.
Five bars is a very short measurement window.
As a result, crossings come often on any fast chart.
Meanwhile nothing filters a crossing in flat trade.
Every arrow confirms on a closed bar.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
A crossing is the single event this reports. `EnableAlerts` holds the master switch with `EnablePopup` already opening a terminal window. The phone push, the terminal mail route and the desktop beep behind `SoundFile` all start switched off.
Every Scalping vs swing trading Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
KPeriod |
Bars in the range measurement, `5`. | 5 |
DPeriod |
Length named for the smoothing blend, `3`. | 3 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch over the cross message, `true`. | on |
EnablePopup |
Opens it as a terminal window, `true`. | on |
EnablePushNotify |
Pushes it out to a phone, `false`. | off |
EnableEmail |
Mails it from the terminal, `false`. | off |
EnableSound |
Beeps it at the desktop, `false`. | off |
SoundFile |
Clip the beep uses, `”alert.wav”`. | alert.wav |

Where the defaults make sense
Five bars is a scalper’s window whatever chart you open it on. EURUSD M15 gives a workable rhythm, with a handful of crossings a session. M5 produces more than most people can act on. H1 slows it to a few a day, which is where the swing half of the name would start to apply.
The limits
A five-bar window reacts to almost any candle.
Nothing spaces repeated crossings apart.
Because the reading stays hidden, a mark carries no context.
One signal set cannot serve two trading styles.
Copy the compiled Scalping vs swing trading 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 vs swing trading Indicator for MT4 and MT5
The zip holds the compiled Scalping vs swing trading 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.
FAQ
What exactly does DPeriod 3 smooth?
The position figure itself. The code blends the current value against twice the previous one and divides by three, which reacts faster than a plain three-bar average would and keeps crossings frequent.
Does the tool actually compare scalping to swing trading?
No. There is one signal pair, `Scalping Buy` and `Scalping Sell`, driven by a five-bar window. Whether it suits a swing approach depends entirely on which timeframe you load it onto.
Where does a Scalping Buy arrow get placed?
Half the bar’s own range below its low. The gap therefore widens on a large candle and narrows on a small one, so marks stay readable across symbols without a point setting to adjust.
Is KPeriod 5 too short to be useful alone?
On its own it produces a lot of marks. The tool carries no trend filter and no cooldown, so pairing it with something slower is the usual way people make five-bar crossings workable.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Scalping vs swing trading Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Prime Standard on Wikipedia.
- For wider market background, see Trading Strategies at StockCharts ChartSchool.
