The demarker pivots indicator adds a signal line to a reading that rarely gets one. DeMarker runs from 0 to 1. So its extremes are easy to set. `OversoldLevel` and `OverboughtLevel` fix the two pivots. Marks then land on those levels, not on the 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 0.3 / 0.7) |
| Plots | 4: DeMarker, Signal EMA, BUY, SELL |
| Alerts | popup, push notification, email, sound |
| Inputs | 10 |
What the Demarker Pivots Indicator draws on the chart
DeMarker is the dodger blue line, bounded between 0 and 1.
Signal EMA is the gold line, smoothed at `SignalEmaPeriod` bars.
BUY draws at the `OversoldLevel` height and SELL at the `OverboughtLevel` height.
Reference lines mark 0.3 and 0.7.
- DeMarker: line, dodger blue, width 2
- Signal EMA: line, gold, width 1
- BUY: arrow, lime, width 2, arrow code 233
- SELL: arrow, red, width 2, arrow code 234

How the Demarker Pivots Indicator calculates its values
Reading DeMarker
iDeMarker gives the value at `DeMarkerPeriod` `14`. It weighs how far a bar pushed past the last high. Then it weighs how far the bar fell below the last low. The ratio of the two is bounded by its own arithmetic.
Smoothing the reading
iMAOnArray runs an average at `SignalEmaPeriod` `5` over DemBuf. So the gold line smooths the reading, not price. A zero or empty result writes EMPTY_VALUE. That avoids a false number.
Where the marks sit
BuyBuf writes `OversoldLevel` `0.30` itself. SellBuf writes `OverboughtLevel` `0.70`. Both marks line up along their level. On a small pane that keeps a run of them easy to count.
How to read the signals
The reading is bounded, so 0.7 always means the same thing.
Marks sit on the two pivot levels, not on the blue line.
The gold line lags, so a crossing confirms a shift late.
Tighten the two levels toward 0.2 and 0.8 for rarer marks.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` starts on. `EnablePopup` carries the message. `EnablePushNotify`, `EnableEmail` and `EnableSound` all begin false. `SoundFile` picks the clip. The cross test reads two closed bars.
Every Demarker Pivots Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
DeMarkerPeriod |
DeMarker period. Bars in the reading, default `14`. | 14 |
SignalEmaPeriod |
EMA signal line period. Smoothing applied over the reading, default `5`. | 5 |
OversoldLevel |
Oversold pivot. Lower pivot, default `0.30`. | 0.30 |
OverboughtLevel |
Overbought pivot. Upper pivot, default `0.70`. | 0.70 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Master switch for the pivot cross alerts, default `true`. | on |
EnablePopup |
Terminal dialog on a pivot cross, default `true`. | on |
EnablePushNotify |
Phone push on a pivot cross, default `false`. | off |
EnableEmail |
Mail delivery on a pivot cross, default `false`. | off |
EnableSound |
Sound playback on a pivot cross, default `false`. | off |
SoundFile |
Wav clip for the pivot alert, default `alert.wav`. | alert.wav |

Settings that fit your chart
A bounded reading travels well between instruments. EURUSD H1 is the reference chart. There `DeMarkerPeriod` at `14` covers over half a day. On M5 the line hits both pivots several times a session. On daily bars a visit is far rarer.
When the Demarker Pivots Indicator fails
DeMarker can sit at an extreme for many bars in a strong run.
Smoothing the reading adds lag on top of the lag it already has.
A mark on a level says a crossing happened, not how far past it went.
Copy the compiled Demarker Pivots 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 Demarker Pivots Indicator: idemarker (DEMARKER) at the MQL5 Documentation, Dual exchange rate on Wikipedia.
Download the Demarker Pivots Indicator for MT4 and MT5
The zip holds the compiled Demarker Pivots 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 DeMarkerPeriod at 14 measure?
How far each bar pushed past the last high, set against how far it dropped below the last low. The window is fourteen bars. Both figures are distances. So the ratio lands between 0 and 1.
Why does SignalEmaPeriod smooth the reading?
So the pane carries a second line to read against. iMAOnArray runs over the DeMarker buffer, not price. A crossing is then a statement about the reading itself. That is the point of adding it.
Why do the BUY marks sit on OversoldLevel?
The buffer writes the level value itself, at `0.30`. Every buy mark then lands at one height. On a pane this small that keeps things clear, since line and arrows would else overlap.
Should OverboughtLevel move from 0.70?
It depends on your chart. On M5 the reading hits 0.70 several times a session, so pushing it to 0.80 thins the marks. On daily bars the default already gives very few.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Demarker Pivots Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. Also, browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- The core method is documented in idemarker (DEMARKER) at the MQL5 Documentation.
- Additional market context is at Dual exchange rate on Wikipedia.
