Out of the box the stochastic cross alert indicator marks every crossing its two lines make, wherever they sit on the scale. One switch changes that. Turn `ZoneFilter` on and only crossings inside the extreme zones survive, which usually cuts the count by more than half.
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 20 / 50 / 80) |
| Plots | 4: %K, %D, Cross Up, Cross Down |
| Alerts | popup, push notification, email, sound |
| Inputs | 13 |
What the Stochastic Cross Alert Indicator draws on the chart
Two lines and a pair of marks below price.
`%K` runs yellow at width 2.
`%D` runs deep sky blue beside it.
A lime `Cross Up` mark sits under the crossing.
A red `Cross Down` mark sits above one.
References sit at twenty, fifty and eighty.
- %K: line, yellow, width 2
- %D: line, deep sky blue, width 2
- Cross Up: arrow, lime, width 2, arrow code 233
- Cross Down: arrow, red, width 2, arrow code 234

How the Stochastic Cross Alert Indicator calculates its values
Position in a window
`KPeriod` `14` bars give a highest high and a lowest low. Where the close sits between them, as a percentage, is the raw figure.
Two averaging steps
Raw values are too jumpy to cross cleanly. `Slowing` `3` averages them into the yellow line, and `DPeriod` `3` averages that into the blue one.
The optional narrowing
`ZoneFilter` ships false, so every crossing prints. Switch it true and a crossing must sit above `UpperLevel` `80.0` or below `LowerLevel` `20.0`.
How to read the signals
By default a crossing anywhere on the scale prints.
Mid-scale crossings are the most frequent and the weakest.
The filter switch is the first thing to try.
The scale runs zero to one hundred and stays there.
Marks sit `ArrowGap` `4.0` off the yellow line.
Fifty is the middle of the recent range.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` opens the message group with `EnablePopup` already on. Three stay dark: `EnablePushNotify` for the mobile terminal, `EnableEmail` through your terminal mail settings, and `EnableSound` playing whatever `SoundFile` names. Crossings report once a bar.
Every Stochastic Cross Alert Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
KPeriod |
%K lookback (raw stochastic). How many bars the search covers, `14`. | 14 |
Slowing |
%K slowing (SMA of raw %K). Averaging applied to the raw figure, `3`. | 3 |
DPeriod |
%D signal SMA period. Averaging applied again for the signal, `3`. | 3 |
UpperLevel |
overbought reference. Where the upper zone begins, `80.0`. | 80.0 |
LowerLevel |
oversold reference. Where the lower zone begins, `20.0`. | 20.0 |
ZoneFilter |
only mark crosses inside OB/OS zones. Keep only crossings inside those zones, `false`. | off |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowGap |
arrow offset from the %K value. Mark offset measured on the scale, `4.0`. | 4.0 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Opens the message group, `true`. | on |
EnablePopup |
A box inside MetaTrader, `true`. | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
Which file the audio uses, `”alert.wav”`. | alert.wav |

Settings that fit your chart
The classic fourteen, three and three arrangement travels well. EURUSD H1 is the reference chart. Unfiltered crossings come several times a day there. On M5 they are constant. On daily bars each one is worth a note.
When the Stochastic Cross Alert Indicator fails
Unfiltered, the two lines cross far too often.
A capped scale sticks at an extreme through a trend.
Two averaging steps put both lines behind price.
One outsized bar fixes the search window for fourteen bars.
Copy the compiled Stochastic Cross 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.
Download the Stochastic Cross Alert Indicator for MT4 and MT5
The zip holds the compiled Stochastic Cross 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.
FAQ
What does ZoneFilter true actually remove?
Every crossing that happens between the two reference levels. Those are the most frequent and the least informative, since the two lines weave around each other constantly in the middle of the scale.
Which line does ArrowGap 4.0 measure from?
The yellow one. Marks sit four points of the zero-to-one-hundred scale away from it, which keeps an arrow clear of the line without pushing it into the reference levels above or below.
Why does ArrowGap use 4.0 on the scale?
Because the marks sit in a pane running zero to one hundred, not in price. Four points of that scale keeps an arrow clear of the yellow line without pushing it into the reference levels.
Where does the KPeriod calculation actually run?
Inside this source. The window search and both averaging steps happen here rather than through a built-in call, so every step of the reading can be checked line by line.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Stochastic Cross 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
- The core method is documented in Cross border listings on Wikipedia.
- Additional market context is at Keltnerchannel at Investopedia.
