The dynamic zone stochastic indicator drops the fixed 80 and 20 lines. It sorts the last `InpLookback` `200` readings and takes a percentile from each end. Those two values become the bands you see in the pane.
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 |
| Plots | 5: K, UpperBand, LowerBand, Buy, Sell |
| Alerts | popup |
| Inputs | 7 |
What the Dynamic Zone Stochastic Indicator draws on the chart
A dodger blue `K` line runs in its own pane.
A red `UpperBand` and a green `LowerBand` move with the data.
`Buy` uses arrow 233 and `Sell` uses 234.
Marks sit ten points from the candle high or low.
- K: line, dodger blue, width 2
- UpperBand: line, red, width 1
- LowerBand: line, green, width 1
- Buy: arrow, lime, width 3, arrow code 233
- Sell: arrow, red, width 3, arrow code 234

How the Dynamic Zone Stochastic Indicator calculates its values
The base is a plain stochastic
iStochastic supplies %K at `InpKPeriod` `14`, `InpDPeriod` `3` and `InpSlowing` `3`. Those are the standard settings, and nothing here alters them.
The bands come from history
The code collects `InpLookback` `200` past readings and takes the value at `InpUpperPct` `90.0` and at `InpLowerPct` `10.0`. So a band means the reading beat nine in ten of its own recent history.
A crossing fills an arrow
%K coming back through a band after sitting outside it fills the matching buffer. Both the current and the previous bar get compared, so a mark needs a real crossing.
How to read the signals
The two bands move, so a level today is not a level next month.
Both bands sitting close together means the reading has been calm.
An arrow says the reading returned through a band, not that it peaked.
`InpUpperPct` `90.0` is a rank, not a value on the 0 to 100 scale.
Alert channels in this build: popup, one message per closed bar.
`InpAlertsOn` ships true and drives the only route this build carries, a terminal popup. No push, mail or sound option exists in the file. The check reads a closed bar, so a single crossing reports once.
Every Dynamic Zone Stochastic Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpKPeriod |
Stochastic %K period. Bars in the %K window, default `14`. | 14 |
InpDPeriod |
Stochastic %D (slowing) period. Bars in the %D smoothing, default `3`. | 3 |
InpSlowing |
Stochastic slowing. Slowing applied to %K, default `3`. | 3 |
InpLookback |
Dynamic zone lookback. Past readings behind each percentile, default `200`. | 200 |
InpUpperPct |
Upper percentile. Rank used for the upper band, default `90.0`. | 90.0 |
InpLowerPct |
Lower percentile. Rank used for the lower band, default `10.0`. | 10.0 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpAlertsOn |
Enable alerts. Terminal popup on a band crossing, default `true`. | on |

Settings that fit your chart
Two hundred readings is a long memory. EURUSD H1 is the reference chart, where `InpLookback` `200` reaches back more than eight days. On M15 that same window covers barely two days. H4 charts stretch it across a month.
When the Dynamic Zone Stochastic Indicator fails
A percentile always exists, so a band appears even in a flat market.
Two hundred bars of history means the bands lag a change in conditions.
The arrows sit a fixed ten points away, which suits some instruments better than others.
Copy the compiled Dynamic Zone Stochastic 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 Dynamic Zone Stochastic Indicator: The Last Stochastic Technique at StockCharts ChartSchool, Foreign exchange aggregator on Wikipedia.
Download the Dynamic Zone Stochastic Indicator for MT4 and MT5
The zip holds the compiled Dynamic Zone Stochastic 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 InpLookback 200 collect?
Two hundred past stochastic readings, which then get ranked. `InpUpperPct` and `InpLowerPct` pick a value out of that sorted list. Shorten the window and the bands react faster, at the cost of a noisier pair of levels.
How is UpperBand different from a fixed 80 line?
A fixed line sits at the same height forever. `UpperBand` sits wherever the ninetieth percentile of recent readings falls, so it drops in a quiet stretch and rises in a busy one. The band adapts; a fixed line cannot.
What does InpSlowing 3 change?
How much the raw %K gets damped before you see it. Three is the MetaTrader default and this build keeps it, along with `InpKPeriod` at fourteen. Raising it gives a smoother line that turns later.
What does InpAlertsOn switch on?
A terminal popup, and nothing else. This build carries no push, email or sound route, so the message shows in MetaTrader only. The guard reads completed bars, which stops one crossing reporting twice.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Dynamic Zone Stochastic Indicator as one input. Always backtest before trading live.
Category: this is part of our Oscillators collection. Also, truly, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in The Last Stochastic Technique at StockCharts ChartSchool.
- Additional market context is at Foreign exchange aggregator on Wikipedia.
