DeMarker
DeMarker compares how much of the recent range came from new highs against how much came from new lows, and returns the result as a ratio between 0 and 1. It answers a narrower question than RSI — it reads the bar extremes rather than the closes — and its scale is 0 to 1, not 0 to 100.
- Default period
- 14
- Overbought
- 0.7
- Oversold
- 0.3
示意性 — 合成数据,非实时报价。
What DeMarker tells you
DeMarker asks which side of the market has been making progress. For each bar it measures how far the high extended beyond the previous high, and how far the low extended below the previous low. Averaged over the period, the two are expressed as one ratio: near 1 almost all the movement has been upward extension, near 0 almost all of it downward. The reading is about the extremes of the bars, which is why it can look different from an oscillator built on closes.
- Above 0.7: buyers have been taking almost all the new ground
- Below 0.3: sellers have
- The scale is 0 to 1 — 0.7 here is not the same number as RSI's 70
- 1 Measure how far each high beat the previous high
- 2 Measure how far each low undercut the previous low
- 3 Average both and take up ÷ (up + down)
显示公式与计算详情
DeMarker is a ratio built from bar extremes rather than closing prices:
- For each bar, take
DeMax = high − high[1]when this high is above the previous one, and 0 otherwise. - Take
DeMin = low[1] − lowwhen this low is below the previous one, and 0 otherwise. - Average both over the period and divide:
DeM = SMA(DeMax) / (SMA(DeMax) + SMA(DeMin)).
Because the numerator is part of the denominator, the result cannot leave the range 0 to 1. A value of 0.5 means new highs and new lows have extended by the same total amount over the window; 0.9 means almost all the new ground has been made upward.
In MQL5 the call is iDeMarker(symbol, period, ma_period) — a period and nothing else. There is deliberately no applied-price argument: the formula already names which prices it uses, and no single series could stand in for both the high and the low.
The scale is the thing to get right. DeMarker’s boundaries are conventionally 0.3 and 0.7, and they are not RSI’s 30 and 70 with a decimal point moved for convenience — they are the actual numbers this indicator produces. A rule written as DeMarker < 30 is legal MQL5, compiles without complaint, and is true on every bar the market has ever printed, because the maximum possible reading is 1. The condition then contributes nothing and the EA trades on whatever else is in the flow. This is the single most common way the indicator is misused, and nothing in the platform warns about it. The subtler version of the same mistake is worth knowing too: a threshold can be on the right scale and still mean something different. The Ultimate Oscillator runs 0 to 100 exactly as RSI does and is drawn with the same 70 and 30 lines, yet measured on identical series it sits above 70 for 1.13% of bars against RSI’s 4.94% — legal, plausible, and four times rarer than intended.
The other thing worth knowing is what an extreme actually means. DeMarker at 0.85 says buyers have taken nearly all the new ground over the last fourteen bars. That is a description of what has happened, not a prediction that it will stop — in a real trend the reading can stay up there for dozens of bars while price keeps making highs. Which is why the Builder’s template does not trade 0.3 on its own: it first requires ATR to be below its value twenty bars earlier, so the rule only fires once the market has stopped extending. The extreme says where price is; the volatility condition says whether fading it is a sensible thing to do.
信号
DeM 提供的可回测信号 — 及每个信号适合的市场状态。
Midpoint Crossover
Builder 可实现Exhaustion in a Trend
Builder 可实现Divergence from Price
高级逻辑MT5 实现
MetaTrader 5 实际计算和绘制的内容——本页每条规则的依据。
缓冲区
| 索引 | 缓冲区 | MT5 中的绘制方式 | 存放内容 |
|---|---|---|---|
| 0 | MAIN_LINE | Line | The ratio itself, bounded between 0 and 1. There is one buffer and no signal line — anything drawn over DeMarker on a chart is a second indicator. |
平台说明
最佳适用场景 / 谨慎使用
没有任何指标具有普适优势。以下是 DeM 发挥作用的场景 — 以及可能误导的场景。
最佳适用场景
- Ranging or contracting markets
- Together with a filter that establishes there is no trend
- Instruments whose highs and lows are meaningful (not heavily gapped)
- Higher timeframes, where single spikes matter less
谨慎使用
- Trending markets — the reading can sit above 0.7 for a long time
- Reading 0.7 / 0.3 as if they were RSI's 70 / 30
- Acting on an extreme with no second condition
- Very short periods, where one wide bar moves the whole ratio
构建 DeM 策略
将信号接入进场和出场规则,然后导出可编译的 MT5 EA — 无需编写代码。
- DeMarker read at the current bar
- Compare it against 0.3 for the long side, 0.7 for the short side
- ATR read at the current bar, and a second ATR node read 20 bars back
- Compare the two — the current one being smaller means volatility is contracting
- DeMarker below 0.3 and ATR contracting → Open Buy · SL 40 / TP 80
- Stop then trails at 2× ATR
将 DeM 与其他指标组合
单一指标很少独立有效。这些组合弥补了 DeM 的盲点。
DeM + ATR
- DeMarker below 0.3
- ATR below its value 20 bars ago
- Buy
DeM + ADX
- ADX below 20
- DeMarker below 0.3
- Buy
No single-flow template pairs DeMarker with ADX. Start from DeMarker Reversal + ATR Squeeze and replace the ATR comparison with an ADX node and a Compare at 20.
打开 Builder →DeM + Bollinger Bands
- Price at the lower band
- DeMarker below 0.3
- Buy
No single-flow template pairs DeMarker with Bollinger Bands. Start from DeMarker Reversal + ATR Squeeze and add a Bollinger node with a Compare against Price.
打开 Builder →参数
在您自己的货币对和时间框架上验证的起始值 — 非保证设置。
| 参数 | 默认值 | 建议测试范围 | 功能说明 |
|---|---|---|---|
| Period | 14 | 5–50 | How many bars of highs and lows the ratio averages. Shorter periods swing between the extremes on a single wide bar; longer ones describe the week rather than the moment. 14 is the documented default and a baseline to re-validate, not portable truth. |
| Shift | 0 | 0–30 | Which bar back the node reads the buffer from. Two DeMarker nodes at different shifts is how a rule expresses 'the reading is turning', since the indicator has no signal line of its own. |
| Applied price | — | — | There is none. The calculation reads each bar's high and low directly, so there is no single series to choose. An applied-price input on a DeMarker is a sign the indicator is not MT5's standard one. |
初始预设
市场示例
DeM 有效的场景、失效的场景,以及过滤器如何改变结果。
Fade inside a quiet range
DeMarker drops below 0.3 while ATR is well under its level twenty bars earlier. The market has stopped extending, and the reversal has room to work.
The same reading inside a trend
DeMarker is below 0.3 but ATR is expanding — price is making genuinely new lows. Buying here is fading a move that has not finished, which is the case the volatility condition exists to remove.
The ATR condition blocks the trade
A run of extreme readings during a volatility expansion is skipped entirely, and the account avoids a sequence of entries against the dominant direction.
FAQ
- Is DeMarker just RSI with different numbers?
- No. They answer similar questions but read different data. RSI averages the size of up closes against down closes; DeMarker measures how far each bar's high extended beyond the previous high and how far each low undercut the previous low. A bar that swings widely and closes unchanged barely moves RSI but does move DeMarker. The two also live on different scales — 0 to 1 here, 0 to 100 there.
- Why is my DeMarker rule always true?
- Almost certainly because the threshold was written as 30 or 70. DeMarker cannot exceed 1, so 'below 30' is true on every bar and 'above 70' is never true. Nothing errors — the condition is simply meaningless, and the EA trades on whatever else is in the flow. Use 0.3 and 0.7.
- What period should I use?
- 14 is MT5's default and the right starting point. Below about 7 a single wide bar can push the ratio to an extreme, and above about 25 the readings describe the week rather than the current move. Treat any number as something to re-validate on your pair and timeframe rather than as a setting that transfers.
- Can I trade DeMarker extremes on their own?
- Not reliably. In a trending market the reading stays at an extreme while price keeps going, so an unfiltered rule fades every leg of a move that is still running. That is why the Builder template requires ATR to be contracting before it acts — the extreme says where the market is, and something else has to say whether fading it is sensible.
- Can I build a DeMarker EA without coding?
- Yes. The DeMarker Reversal + ATR Squeeze template compares DeMarker against 0.3 and 0.7, and requires ATR to be below its value twenty bars back before either side can fire. The period, both levels, the ATR lookback and the trailing multiple are all EA inputs.
- How should I validate settings before going live?
- Backtest on quality tick data, then run on a demo account before risking money. Because this is a reversal rule, pay particular attention to how the equity curve behaves during strong trends rather than to the headline profit — that is where this family of strategies does its damage. Hold back data the search never saw and prefer settings that stay profitable across periods.