DeMarker Indicator Trading Strategy

DeMarker Indicator Trading Strategy: Statistics, Facts And Historical Backtests!

Many trading indicators are available to traders. One of the indicators used in the stock market is the DeMarker indicator, named after Thomas DeMark, a prominent technical analyst. This indicator is a part of a trading system that incorporates bollinger bands.

The DeMarker indicator, also known as “DeM”, is a technical indicator that measures the demand for the underlying asset in the stock market. It is one of the many indicators used by traders to analyze market trends, along with bollinger bands and moving averages. Moving averages, a popular technical analysis tool, compare the most recent high and low prices to those of the previous period to determine trends and momentum. Bollinger bands are often used in conjunction with moving averages.

In this post, we take a look at technical indicators, a popular technical analysis tool that provides insights and signals on market trends. We will explore how to use this powerful tool effectively. We also make a backtest of the indicator.

What is the DeMarker indicator?

Also known as the DeM indicator, the DeMarker indicator is a popular technical trading tool used in the forex market. It measures the demand for the underlying asset and can be tested using a demo account. It compares the most recent high and low prices to those of the previous period to determine the direction of the trend and its momentum.

The DeMarker indicator is a forex trading signal and a member of the oscillator family of technical indicators. It can be used to identify high-risk buying (overbought) or selling (oversold) areas in a given market trend. Traders can also use the trading tool, the indicator line, to determine when to enter a market, or when to buy or sell an asset, and capitalize on probable imminent price trends and signals.

The trading tool was originally created with the market trend in mind, but you can apply it to any timeframe since it is based on relative price data. Designed to be a leading indicator in trading, this tool attempts to signal an imminent change in market price trend before it happens. Traders use the indicator line in trading, in combination with other signals, to determine price exhaustion, identify market tops and bottoms, and assess risk levels. The indicator demarker is an essential tool for understanding the trend.

DeMarker indicator graphic/chart example

Let’s show how the DeMarker indicator looks on a graph, providing signals for market price trading. Below is a ten-day DeMarker indicator:

DeMarker indicator example

As you can see, it’s an oscillating indicator that goes from overbought to oversold levels in the trading market, providing signals for price movements.

DeMarker indicator formula

The DeMarker indicator is essential for understanding market trading. It functions similarly to the RSI indicator oscillator, but it diverges in that it does not focus on closing levels and instead focuses on price.

Instead, the DeMarker indicator focuses on understanding intra-period highs and lows in the trading market to determine price movements. The indicator line compares the price of the current bar on a chart to that of the previous bar. If the current bar has a higher high or a lower low than the previous bar, the indicator Demarker records a value. This is useful for trading purposes. On the other hand, if the current market has a lower high or a higher low than the previous bar, a value of zero is recorded for the price indicator demarker in trading.

These values are used in the market over a ‘look-back’ period (customarily 14 bars) for trading to get a numerator (DeMax) and denominator (the sum of the moving averages of DeMax and DeMin), which is then used to calculate the DeMarker value by dividing the numerator by the denominator.

Thus, the DeMarker indicator is a useful tool for trading in the market. It calculates the moving average of DeMax divided by the sum of the moving averages of DeMax and DeMin. The higher the value of the DeMax relative to DeMin, the greater the value of the DeMarker Indicator in the market for trading.

The formula for calculating DeMarker values in the trading market is given as follows.



  • DEM stands for DeMarker
  • DeMMAX – records the difference between the current high and previous high over the number of X periods
  • DeMMIN – records the difference between the current low and previous low over the number of X periods

The trading equation yields values bounded between 0 and 100 — values of the trading indicator above 70 are considered overbought territory, and values of the trading indicator below 30 are considered oversold territory. However, as always, no trading asset is the same and you need to backtest to find what is working and what is not working in the dem.

For your convenience, we have coded the DeMarker indicator in Amibroker. See the green banner further below in the article.

DeMarker indicator settings

Different platforms can set the indicator differently. But the default setting on most platforms is as follows for dem.

  • The time span for the calculation of values = 14 periods
  • The base value = 0.5
  • The overbought and oversold lines = 70 and 30 respectively

However, you can change the settings to what you want, dem. The larger the number of periods you use, the smoother the curve of the DeMarker Indicator, and the smaller the number of periods, the more responsive the curve.

So, if you use a shorter period for the dem, which would give sharper oscillations, you might want to consider a higher value than 70 for the overbought line and a lower value than 30 for the oversold line. Similarly, if you use a larger period, you might want to consider a lower boundary for overbought, and a higher one for oversold in order to optimize the dem.

How do you use the DeMarker indicator?

Use the DeMarker indicator for a contrarian strategy. That is, you look for a buying opportunity when the dem indicator is showing oversold levels and a selling opportunity when the dem indicator is showing overbought levels. The closer the dem value gets to 0 or 100, the higher the likelihood of a price turn as the market is trading in an extreme environment.

However, you might need to combine DeMarker with a trend-confirming indicator, such as a moving average. In an uptrend, look for only buying setups — oversold DeMarker. In a downtrend, look for only shorting opportunities when the DeMarker is overbought.

DeMarker indicator trading strategy (backtest and example)

Let’s go on to backtest a DeMarker indicator trading strategy with strict trading rules and settings. To get a good historical performance, we backtest the S&P 500 using the oldest ETF still trading, SPY (since 1993 – please read SPY ETF trading) to analyze the performance. This analysis helps us understand the dem of the ETF.

We make an optimization to find out how the DeMarker indicator behaves. Read here for an example and definition of strategy optimization in the context of dem. By using an optimization, we can determine if the indicator (strategy) offers any value to the dem.

These are trading rules:

  • We buy at values below 5 and sell at values above 80.
  • We use lookback periods of 3 to 8 days.

These rules are all there is to it. We get the optimum level at 5 days. If we use a 5-day lookback period, the dem equity curve and drawdowns look like this.

DeMarker indicator strategy backtest

The 141 trades generate an annual return of 4.3% and the profit factor is 2.1.

However, we would not say this is something we would like to trade. If we use the default settings of 30 and 70 the average gain per trade drops to 0.68%, but the annual returns increases to 7.8% because of the large increase in the number of trades and thus more time spent in the market.

If we make two changes the indicator improves:

  • We use a 3-day lookback period
  • We buy when DeMarker indicator is below 5
  • We sell when the close is higher than yesterday’s high

The exit signal plays an important role in trading, something we covered in sell the rip strategy. This looks like a better strategy:

DeMarker indicator strategy trading rules

The 458 trades return a CAGR of 6.7%. The profit factor is still a “low” of 1.85, though.

List of trading strategies

Since we started this blog in 2012 we have written many trading strategies that you can read for free, please see our list of trading strategies. We have compiled the Amibroker code and logic in plain English for all these strategies (plain English is for backtesting in Python) in addition to DeMarker. If you subscribe, you’ll get the code for the DeMarker indicator.

For a list of the strategies we have made please click on the green banner:

These strategies must not be misunderstood for the premium strategies that we charge a fee for:

DeMarker indicator strategy video

We made a short DeMarker indicator strategy video (we are learning, videos have improved since then).

DeMarker indicator strategy – conclusion

There are a “zillion” oscillating indicators for traders, and DeMarker is one of them. However, our strategy backtest reveals that the more famous and used indicators are better. We covered those in a separate article called the best indicator for swing trading.

Similar Posts