What Is the DeMarker Indicator? Formula and Levels
What is the DeMarker indicator? The formula, a worked example, why the scale cannot leave 0 to 1, and how to test a DeM rule on your own data.
The DeMarker, usually shortened to DeM, is an oscillator that compares this bar's high with the previous bar's high and this bar's low with the previous bar's low, then reports the share of recent movement that came from new highs. It moves between 0 and 1, it cannot go below 0 or above 1, and in MetaTrader it sits in the Oscillators folder.
The 0 to 1 bound is worth holding on to, because the published material prints the scale four different ways, the formula two different ways and the overbought level five different ways. All of that is settled by the equation itself.
What is the DeMarker indicator?
A momentum oscillator built from price extremes rather than closing prices. For each bar it asks two questions: did this bar make a higher high than the one before it, and did it make a lower low? The answers are averaged over N bars and turned into a single number between 0 and 1, where a high reading means new highs have dominated and a low reading means new lows have.
It was developed by the technical analyst Thomas DeMark. capital.com says it was "first published in his 1994 book, The New Science of Technical Analysis". litefinance.org says it was "created in the 1980s by the famous trader Thomas DeMark", and topfxbrokersreview.com also puts its development in the 1980s. Those can all be true at once, a tool built before the book that described it.
In MetaTrader the indicator ships with the platform. MetaQuotes files it under Oscillators in its own help, and topfxbrokersreview.com gives the menu route as Insert, then Indicators, then Oscillators, then DeMarker.
The names collide. The DeMarker is the bounded oscillator, and the TD family, including TD Sequential, is a separate set of tools by the same author.
Where is the DeMarker in ChartLabs?
It is built in. Open the chart's Indicators menu, go to the Standard list and look under the Momentum & Oscillators heading for DeMarker. It opens in its own pane below the price chart, with Length 14 as its default, plotted on the 0 to 1 scale with guide lines drawn at 0.7 and 0.3.
What is the DeMarker formula?
MetaQuotes publishes it like this, in its own help page for the indicator:
DeMax (i) = HIGH (i) - HIGH (i - 1) if HIGH (i) > HIGH (i - 1), otherwise 0
DeMin (i) = LOW (i - 1) - LOW (i) if LOW (i) < LOW (i - 1), otherwise 0
DMark (i) = SMA (DeMax, N) / (SMA (DeMax, N) + SMA (DeMin, N))
N is the number of bars averaged and SMA is a simple moving average. In plain words: average how much higher the new highs were, average how much lower the new lows were, then divide the first by the sum of both.
A footnote on the vendor page itself: its prose says the differences "are then summed" while its formula averages them. For a ratio that makes no difference, since dividing both the top and the bottom by N cancels out, but it matters if you rebuild the line in a spreadsheet and wonder which one to follow.
A worked example with round numbers
These numbers are chosen to be easy rather than realistic. Five bars give four comparisons, because the first bar has nothing before it, so N is 4 here:
| Bar | High | Low | DeMax | DeMin |
|---|---|---|---|---|
| 1 | 100 | 98 | - | - |
| 2 | 102 | 99 | 2 | 0 |
| 3 | 101 | 97 | 0 | 2 |
| 4 | 104 | 100 | 3 | 0 |
| 5 | 103 | 99 | 0 | 1 |
Bar 2 made a higher high, 102 against 100, so DeMax is 2, and it did not make a lower low, so DeMin is 0. Bar 3 did the reverse: no new high, and a low of 97 against 99, so DeMin is 2. Bar 4 made a new high three points up. Bar 5 made no new high, but its low of 99 is one point under bar 4's low of 100.
Average DeMax is (2 + 0 + 3 + 0) / 4, which is 1.25. Average DeMin is (0 + 2 + 0 + 1) / 4, which is 0.75.
DeM = 1.25 / (1.25 + 0.75) = 1.25 / 2.00 = 0.625
So 0.625 on a 0 to 1 plot, or 62.5 on a plot scaled to 100. Below the usual 0.7 line, so by the common convention that is not an overbought reading.
globaltill.com publishes a similar example under the label "a simplified 5-period example", with highs of 50, 52, 51, 53, 52 and lows of 45, 47, 46, 48, 44. Its arithmetic is sound: its result, "1.0 / 2.25 = 0.444 or 44.4", holds.
The formula has one gap. If no bar in the window makes a new high and none makes a new low, both averages are zero and the ratio has nothing to divide. That takes N bars of identical highs and lows, so you will rarely meet it, but it is why the indicator is defined by movement rather than by price.
Does the DeMarker use a 0 to 1 scale or 0 to 100?
Both describe the same reading, and you can settle it from the formula rather than by comparing pages. Both DeMax and DeMin are either a positive difference or zero, so neither average can be negative. The top of the fraction is also part of the bottom. A non-negative number divided by itself plus another non-negative number has to land between 0 and 1.
So the value can never leave 0 to 1, any plot showing 0 to 100 is showing the same number multiplied by a hundred, and a negative DeMarker reading is impossible. One source prints a range of -100 to 100, which the formula it describes on the same page forbids.
Directly above the formula that forbids it, MetaQuotes writes: "When the indicator falls below 30, the bullish price reversal should be expected. When the indicator rises above 70, the bearish price reversal should be expected." On a line plotted 0 to 1, neither 30 nor 70 is reachable. The sentence reads as though the levels belong to a 0 to 100 plot, and since this is the vendor's own documentation it is the likely origin of much of the web's 70 and 30.
A practical move for MT4, from topfxbrokersreview.com: the indicator's dialog has a Scale tab where you can enter a minimum and a maximum and tick the fixed minimum and fixed maximum boxes. Setting them to 0 and 1 stops the panel rescaling itself as the line moves, which makes two readings on different days comparable by eye.
A note on misprinted formulas
Rebuild the line from the vendor equation rather than from a secondary source, because three kinds of misprint are common.
Some sources print a formula with no moving average in it at all, comparing one bar with one bar: litefinance.org gives "DeM = (Max(high - previous high, 0)) / (Max(high - previous high, 0) + Max(previous low - low, 0)) * 100", and topfxbrokersreview.com reproduces it word for word. On that version the period setting would change nothing, yet both pages still tell you the standard setting is 14 periods.
Others print the moving averages correctly and lose the division sign. admiralmarkets.com, blueberrymarkets.com and tradingstrategyguides.com all print "SMA(DeMMAX) [SMA(DeMMAX) + SMA(DeMMIN)]", with a bracket where the divide should be. The prose on admiralmarkets.com is right, telling you "the DeMarker value is calculated by dividing the numerator by the denominator", so the equation simply does not say what the page means.
And the sources disagree about whether the indicator smooths at all. tradingstrategyguides.com says "The Demarker curve becomes more responsive to the price because it doesn't smooth price data", on a page whose own equation contains two simple moving averages. globaltill.com says the opposite and treats it as a limitation: "While designed as a leading indicator, DeM still uses moving averages in its calculation, which can delay signals slightly compared to pure price action". The vendor formula has the averages in it, so smoothing is part of the indicator.
What are the overbought and oversold levels?
0.7 and 0.3 by convention, which is 70 and 30 on a plot scaled to 100. They are conventions rather than part of the calculation, and nobody has tested them.
The published spread: 0.7 and 0.3 is the common pair, on capital.com, admiralmarkets.com, topfxbrokersreview.com, blueberrymarkets.com and globaltill.com. tradingstrategyguides.com prefers 0.9 and 0.1, writing that "instead of using the classical 0.7 and respectively 0.3 levels we use the 0.9 and respectively 0.1 levels", and also mentions trading the 0.0 and 1.0 extremes. capital.com offers "Wider thresholds, such as 0.2 and 0.8" for strong trends. globaltill.com offers 75 and 25 for crypto. forexindicators.net writes that "Any level between 3 and 7 (or 30 and 70 if bigger numbers are preferred) is regarded as a neutral level", and on the 0 to 1 scale that page itself names, 3 and 7 cannot occur.
admiralmarkets.com says what a zone is: "overbought and oversold simply mean unusually high and low prices judged by the sample data included in the look-back period". Unusual compared with the last N bars, and nothing more. Change N and you change what counts as unusual.
What is the default DeMarker setting?
14, in both MT4 and MT5, according to admiralmarkets.com, which puts it plainly: the Period parameter "has a default value of 14 in both MT4 and MT5". MetaQuotes' own help page states no default at all. Most sources print 14; blueberrymarkets.com says "The default time period set by the indicator is 13".
That same page then calls the setting a timeframe, telling the reader to pick "a lower timeframe if you are a short-term trader". Those are two different things, and the distinction matters when you write a rule down. The period is how many bars get averaged. The timeframe is how long each bar lasts. A 14-period DeMarker on a 1-hour chart and a 14-period DeMarker on a daily chart use the same period and read completely different markets.
If you want to know whether a different period suits what you trade, change that one number and re-run the same date range, then compare. capital.com states the discipline: "Any change to the defaults is best understood through testing rather than assumption." It also lists "Over-optimising settings" among its five common mistakes.
How do you read the DeMarker: what are the signals?
Three readings appear across the sources.
A move out of a zone, not the entry into it. globaltill.com waits for the line to drop below 30 and then cross back above it. admiralmarkets.com says "As soon as the indicator rises above 0.3, traders can consider buying the market, provided that they can get in below 0.5". That rule is specific, and it is untested on the page that prints it.
The 0.5 midpoint cross. capital.com treats it as a separate and softer reading: a move up through 0.5 "may suggest that demand is gaining the upper hand", and a slide down through it the reverse.
Divergence. The standard labels, as globaltill.com prints them: price makes a higher high while the DeMarker makes a lower high is bearish; price makes a lower low while the DeMarker makes a higher low is bullish.
Check your divergence labels against those, because one source publishes them the other way round. litefinance.org writes: "If the price makes a higher high, but the DeMarker indicator forms a lower high, it shows a bullish divergence, which hints at hidden upward momentum", and calls a lower low against a higher low "a bearish divergence".
blueberrymarkets.com carries two more reversed readings. It prints two bullets that cannot both hold, "Values around but below 0.7 indicate a strong uptrend" and "Values around but more than 0.3 indicate a strong downtrend", whose ranges overlap almost everywhere. And its DeMin rule runs backwards: "When the current low/high is less than the previous low/high, a value of 0 is recorded", where the vendor formula records a value precisely when the current low is lower.
Does the DeMarker work better in a range or a trend?
Nobody has tested it, so this stays open, and the published answers point in three directions.
Three sources say ranging. capital.com: "DeMarker readings are generally more useful in ranging markets." forexindicators.net: "The indicator is most suitable to a ranging market." globaltill.com's comparison table gives its "Best Market Condition" as "Ranging, topping/bottoming markets".
blueberrymarkets.com says the opposite outright: the strategy "works best in markets with a strong uptrend or downtrend and should not be used with a ranging market".
globaltill.com says both on one page. Its limitations list warns of "False signals in choppy markets: In sideways, range-bound conditions with no clear trend, DeM may generate frequent crossovers that don't lead to sustained moves", a few screens from the table recommending ranging markets.
admiralmarkets.com offers a fourth position that is not really an answer to the question. It reads the zones as a measure of the trend rather than a reversal warning: "If a market remains for an extended period in extreme overbought levels, it confirms that the market is in an uptrend, for example." So the same reading most sources treat as a warning that a move is ending is, there, confirmation that it is continuing.
That makes it a question to settle on your own data rather than by picking a source.
Is the DeMarker just the RSI?
No, and the difference is the input. The RSI is built from closing prices. The DeMarker is built from highs against highs and lows against lows, which is why the two disagree on inside bars and on bars with long wicks: a bar can close almost unchanged while making a sharply higher high. capital.com states it: "Unlike the RSI, it focuses on intra-period highs and lows rather than closing prices."
One source says the opposite. forexindicators.net claims "both indicators compute the same formulae for the min-max values", and goes further: "one will never need to create technical strategy where both the Demarker and RSI indicators are necessary". That page also opens by saying the indicator was built "to overcome the shortcomings of other overbought/oversold oscillators" before concluding it adds nothing the RSI does not, which cannot both be true.
Where does the DeMarker fall apart?
A zone can hold for a long time. capital.com, admiralmarkets.com and globaltill.com all say so, and globaltill.com puts it bluntly: DeM "can stay overbought (>70) or oversold (<30) for extended periods. Trading reversals in these situations can lead to significant losses". Treating every touch of 0.7 as a top means trading against the trend for as long as the trend lasts.
The levels are conventions. Change the period and the same price action produces different readings, which is why "overbought" has no fixed meaning here.
And the published literature does not agree on the formula, the default or the scale, which is unusual for an indicator that, as admiralmarkets.com notes, "is included as one of the indicators that come as standard with the platform" in both MT4 and MT5. That is a reason to test a DeMarker rule yourself rather than inherit one. One source does offer a figure for a bond strategy, but it names no instrument, no date range, no venue and no source, and the same page's takeaways and tips disagree about whether 14 periods is the better setting, so there is nothing there to check or to repeat.
How do you backtest a DeMarker rule, step by step?
Pick one pair, one timeframe and one date range, then write the rule down before you look at the first bar. On this indicator that discipline matters more than usual, because the period, the two levels and the scale are all in dispute. A rule that does not state all three is not a rule.
So write down all of it:
- The period. 14, 13, or whatever you picked, named as a number of bars and not as a timeframe.
- The scale you are reading, so 0.7 and 70 never get mixed up in your notes.
- The level, and the direction it is crossed. Entering the zone and leaving it are different rules and they fire on different bars.
- The bar you read it on. The value changes until the bar closes, so say whether you act on the close of the signal bar or the open of the next one.
- The entry, the stop and the exit, each as a price rule rather than a judgement.
The ChartLabs build follows MetaTrader's simple-moving-average formula above, so the first two of those five are settled before you plot anything and the third's levels are already drawn for you. Sub-panel indicators and drawings save automatically as you work. There is no automated signal testing: you step the chart forward and take the trades yourself.
Then replay the range bar by bar, take every trade the rule gives you including the ones you dislike, and record them all. That is the point of manual rather than automated backtesting: you see each signal arrive with no knowledge of what came next, which is how you find out whether a rule you just wrote is one you can actually follow.
Two things decide your result. Set commission and slippage per symbol before you start, so the P&L is the cost-adjusted one rather than the flattering one. And watch how many trades the test contains, because a handful tells you nothing; our forex backtesting guide covers the sample size question.
Record, per trade: the date and direction, entry, stop and exit prices and the result in R, the DeMarker value at entry, which level fired and which way it was crossed, which bar you read the value on, and whether the market was ranging or trending by a test you wrote down in advance rather than by how the chart looks afterwards. Then the number almost nobody reports: how many trades the whole test contained.
Test it yourself instead of picking a page
Four scales, two formulas, five overbought levels and no usable published test. No amount of reading settles the DeMarker, because none of the published material tested anything you can check.
What settles it is your own data: one pair, one range, one rule written down in advance, every trade recorded, and a sample large enough to mean something.
ChartLabs is a manual backtesting platform for that. You replay historical charts bar by bar, take practice trades as the market unfolds, and review what happened with costs applied. Data comes from Dukascopy, tick-level where it is available, cleaned to remove anomalies, with history reaching up to around 22 years on the oldest forex pairs and other instruments starting later.
One plan, $20 a month or $200 a year, everything included. Start your free trial.