Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (2024)

In trading, divergence means that the price swings and the indicator movement are not in phase. A divergence signal is generated when the price is making a higher swing high but the indicator is making a lower high, or the price is making a lower swing low when the indicator is making a higher swing low, thus indicating a potential divergence trading strategy. This implies that the price swing is losing momentum and is likely to reverse soon.

Divergence is a very common signal used by traders to find opportunities in various financial markets, and there are many indicators you can use to identify it. But what is the divergence strategy?

In this post, we take a look at the divergence trading strategy and the indicators for trading it. We backtest a divergence strategy. But first, let’s start with some theory and examples:

Table of contents:

Divergence trading strategy backtest (example)

As you might imagine, making a 100% quantifiable divergence trading strategy backtest with trading rules and settings is not an easy task.

That said, we can make a very simple yet powerful backtest. We backtest the following trading idea on the S&P 500 (using the ETF with the ticker code SPY):

Divergence Strategy Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________BECOME A MEBER TO GET ACCESS TO TRADING RULES IN ALL ARTICLES Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (2)CLICK HERE TO SEE ALL 350 ARTICLES WITH TRADING RULES

These are pretty easy trading rules to backtest.

We make a strategy optimization and we get the following table (we have previously covered how to optimize a trading strategy):

The first column shows how many days we use in our backtest and settings. The fourth column shows the profit factor. What is a good profit factor? We like to see at least 1.75 and as you can see, from 2 to up to around 20 days the results are pretty good. The next column, showing the Sharpe Ratio, is also pretty impressive (read here about what is a good Sharpe Ratio?)

Equity Curve Divergence Trading Strategy

Let’s look at the equity curve of the divergence trading strategy number 2 (row 2):

What is a good equity curve? We believe the equity curve above is a pretty good one, but it might be liable to a certain degree of curve fitting (what is curve fitting?) Max drawdowns are very low (what is a good maximum drawdown?) and the only losing year was 2012. However, please notice the relatively few trades over such a long period.

What is a Divergence Trading Strategy?

In trading, divergence means that the price swings and the indicator (oscillator) movement are not in phase. A divergence signal is formed if the price is making a higher swing high when the oscillator is making a lower high, or if the price is making a lower swing low when the indicator is making a higher swing low. There are other configurations that also indicate a divergence.

A Divergence Trading Strategy is a method employed in financial markets to identify potential reversals or shifts in momentum by comparing price action with an oscillator indicator. This strategy operates on the principle that when an asset’s price moves in one direction while the oscillator moves in the opposite direction, it signals a potential divergence between price and momentum, indicating a possible upcoming reversal. Traders use various oscillators such as the Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), or Stochastic Oscillator to spot these divergences.

Bullish divergence occurs when price forms lower lows while the oscillator forms higher lows, suggesting underlying strength despite downward price movement. Conversely, bearish divergence occurs when price forms higher highs while the oscillator forms lower highs, indicating potential weakness despite upward price movement. Traders employing this strategy typically wait for confirmation signals, such as trendline breaks or additional indicators, before executing trades to mitigate false signals.

Divergence trading can be used in conjunction with other technical analysis tools to enhance its effectiveness in predicting market reversals and identifying potential trading opportunities. However, like any trading strategy, it carries inherent risks, and traders should combine it with proper risk management techniques and thorough analysis of market conditions.

What are the Different types of divergence?

There are four different situations that can generate divergence. However, based on the price swings and the market structure, divergence is broadly classified into two categories: classical and hidden.

1) Classical divergence

Also known as regular divergence, the classical divergence is formed when the price is making a lower low but the indicator is making a higher low, or when the price makes a higher high but the indicator is making a lower high. This type of divergence forms mostly against the prevailing trend and may indicate the reversal of the trend or an emergence of a temporary pullback. Sometimes, a classical divergence may signal the continuation of the trend after a pullback if it forms in a multiple-legged pullback.

Depending on where it forms, a classical divergence can be a bullish divergence or a bearish divergence:

  • Bullish classical divergence: This signal is generated when the price makes a lower swing low while the indicator is making a higher low. It is associated with downswings and may occur in a downtrend or a multi-legged pullback in an uptrend. As the name suggests, the bullish classical divergence shows that an upward price reversal is likely.
  • Bearish classical divergence: This signal is generated when the price makes a higher swing high while the indicator is making a lower high. It is associated with upswings and may occur in an uptrend or a multi-legged pullback in a downtrend. The bearish classical divergence shows that a downward price reversal is likely.

2) Hidden divergence

Hidden divergence forms when the price makes a higher low in an uptrend but the indicator makes a lower low, or when the price makes a lower high in a downtrend and the indicator makes a higher high. This kind of divergence is mostly with normal pullbacks in a trend and indicates that a pullback is about to reverse for the trend to continue. However, on some occasions, a hidden divergence may occur at the end of a trend if it forms with the head and shoulder pattern or the inverse head and shoulder pattern.

Depending on where it occurs — swing high or low — the hidden divergence can be bullish or bearish:

  • Bullish hidden divergence: Mostly seen at the end of a pullback in an uptrend, the bullish hidden divergence forms when the price is making a higher swing low and the indicator is making a lower low. It signals a bullish reversal, so the existing uptrend would continue.
  • Bearish hidden divergence: This is mostly after a rally in a down-trending market. It forms when the price is making a lower swing high while the indicator is making a higher high. It signals a potential downward price reversal for the existing downtrend to continue.

Which indicator is best for divergence?

The best indicator for divergence is momentum and mean reversion oscillators. The only way to know the best one for the market you want to trade is to back-test them and choose the one that performs best. As you know, we emphasize systematic trading, and what we have found is that whatever indicator you use, the divergence strategy is difficult to quantify.

Nonetheless, there are many indicators you can use for the divergence strategy. Some of them are purely price-based indicators, while some are based on volume data alone or a combination of price and volume data.

How to identify bullish divergence?

A bearish divergence occurs when the price of an asset forms a higher high while the technical indicator forms a lower high.

How to identify bearish divergence?

Bearish divergence can be identified by comparing the price of an asset with its relative strength index (RSI) or other momentum indicators. Look for a scenario where the price is making higher highs while the RSI or other momentum indicator is making lower highs. This divergence suggests weakening bullish momentum and a potential trend reversal, indicating a bearish outlook.

Which examples of price-based indicators are there?

Examples of price-based indicators include:

  • Relative Price Index (RSI) indicator
  • Stochastic indicator
  • Commodity Channel Index (CCI)
  • Moving average convergence and divergence (MACD)
  • Williams %R indicator
  • Awesome indicator
  • Rate of Change (the Momentum Indicator)

Which examples of volume-based indicators are there?

  • On-balance volume
  • Volume RSI
  • Chaikin money flow indicator
  • Accumulation/distribution
  • Volume price trend indicator
  • Negative volume index
  • Force index
  • Money flow index
  • Ease of movement

Choose the ones you prefer and backtest them to know what would work in the market you are trading. RSI may work well for stocks and not work well for commodity futures. In the same way, the stochastic or CCI may work well for commodity trading and perform poorly for stock trading. Only backtesting can sort this out for you, and you might want to have a look at our backtesting course:

How does divergence occur in trading?

Divergence in trading occurs when there is a disparity between the price action of an asset and a technical indicator. This phenomenon can manifest in various ways depending on the specific indicators used and the market conditions. Typically, traders look for discrepancies between the price movement and indicators such as the Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), or Stochastic Oscillator.

For instance, bullish divergence occurs when the price of an asset forms lower lows while the indicator forms higher lows, indicating potential upward momentum. On the other hand, bearish divergence happens when the price forms higher highs while the indicator forms lower highs, signaling a possible downward reversal.

Why is divergence important in market analysis?

Divergence holds significant importance in market analysis due to its capacity to unveil crucial insights about the underlying dynamics of financial instruments or markets. This analytical tool scrutinizes the relationship between indicators or trends, highlighting instances where they deviate from each other. Such deviations often serve as early signals of potential shifts in market sentiment, trends, or momentum.

By identifying divergence, analysts can discern instances where price movements are not aligned with corresponding indicators, such as oscillators or moving averages. This discrepancy can indicate potential reversals, overbought or oversold conditions, or the emergence of new trends. Therefore, divergence serves as a valuable tool for traders and investors alike, providing actionable information for decision-making.

Moreover, divergence analysis aids in confirming the strength or weakness of prevailing trends. Bullish or bearish divergence, for instance, can provide clues regarding the sustainability of an ongoing trend, offering traders insights into when a trend may be losing momentum or gaining strength.

Furthermore, divergence analysis is not limited to price indicators but can also encompass other market metrics, such as volume or market breadth. By examining multiple facets of market behavior, analysts can gain a more comprehensive understanding of underlying market dynamics, enhancing the accuracy of their predictions and the effectiveness of their trading strategies.

What indicators are commonly used in divergence trading?

Commonly used indicators in divergence trading include the Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Stochastic Oscillator, and the Commodity Channel Index (CCI). These indicators help traders identify discrepancies between the price movement and the momentum of a security, which can signal potential reversals or shifts in trend direction. Divergence occurs when the price makes a new high or low, but the corresponding indicator fails to confirm the same move, indicating a weakening trend. By recognizing these divergences, traders can anticipate potential changes in price direction and make informed trading decisions.

What role does market momentum play in Divergence Trading Strategy?

Market momentum plays a significant role in the Divergence Trading Strategy as it provides valuable insights into the strength and direction of price movements. In this strategy, traders look for discrepancies between price action and momentum indicators, such as the Relative Strength Index (RSI) or Moving Average Convergence Divergence (MACD). When market momentum diverges from price movements, it can signal potential reversals or corrections in the trend. For instance, if prices are making new highs while momentum indicators are failing to confirm these highs, it could indicate weakening bullish momentum and potential for a downturn. Conversely, if prices are declining while momentum indicators are rising, it could suggest strengthening bullish momentum and a possible trend reversal to the upside. Therefore, understanding market momentum is crucial for identifying divergence patterns and making informed trading decisions within this strategy.

What are the advantages of employing the Divergence Trading Strategy?

Employing the Divergence Trading Strategy offers several advantages that make it a compelling approach for traders. One significant advantage is its ability to capitalize on price momentum shifts before they are fully reflected in market trends. By identifying divergences between price movements and technical indicators, such as oscillators or moving averages, traders can spot potential reversals or continuations in the market trend ahead of time.

Furthermore, the Divergence Trading Strategy provides traders with clear entry and exit signals. When a divergence occurs, indicating a discrepancy between price action and the underlying momentum, traders can establish positions with defined risk levels and profit targets. This structured approach helps traders manage their trades more effectively and reduces the emotional aspect of decision-making.

Another advantage of this strategy is its versatility across different time frames and financial instruments. Whether trading stocks, forex, commodities, or cryptocurrencies, divergences can be observed and utilized to make informed trading decisions. Additionally, the strategy can be adapted to suit various trading styles, including day trading, swing trading, or even longer-term investing.

How does volume analysis complement the Divergence Trading Strategy?

Volume analysis plays a pivotal role in complementing the Divergence Trading Strategy by providing crucial insights into the strength and validity of potential trade signals. Divergence trading relies on identifying discrepancies between price movements and technical indicators, such as oscillators like the Relative Strength Index (RSI) or Moving Average Convergence Divergence (MACD). While these indicators can signal potential reversals or continuations in price trends, volume analysis adds another layer of confirmation or caution.

When employing divergence trading, observing volume alongside price and indicator movements can offer valuable confirmation or divergence signals. For instance, if a divergence pattern forms where price makes a new high but the RSI fails to surpass its previous peak, indicating a potential bearish divergence, a corresponding decrease in volume could further validate the signal. A decrease in volume suggests weakening market participation, reinforcing the likelihood of a trend reversal.

What are the common mistakes to avoid in Divergence Trading Strategy?

In Divergence Trading Strategy, it’s crucial to steer clear of several common mistakes that can undermine your efforts to capitalize on market divergences effectively. One such mistake is failing to thoroughly understand the concept of divergence itself. Divergence occurs when the price of an asset moves in the opposite direction of an indicator, signaling a potential shift in trend direction. Ignoring or misinterpreting these signals can lead to poor trading decisions.

Another mistake is relying solely on divergence signals without considering other factors such as market context, trend strength, or fundamental analysis. Divergence signals are most effective when used in conjunction with other technical indicators or analytical methods to confirm potential trade opportunities.

Overtrading is another pitfall to avoid. It’s tempting to enter multiple trades based on every divergence signal, but this can lead to increased transaction costs and diluted returns. Instead, focus on high-probability setups and exercise patience when waiting for favorable trading conditions.

Additionally, failing to use proper risk management techniques is a common mistake among divergence traders. Without implementing stop-loss orders or position sizing strategies, traders expose themselves to excessive risk and potential losses. It’s essential to protect capital and preserve trading accounts by managing risk effectively.

Lastly, emotional decision-making can derail divergence trading strategies. Fear, greed, and impatience can lead to deviating from the trading plan or holding onto losing positions for too long. Maintaining discipline and adhering to predetermined trading rules can help mitigate the impact of emotions on trading decisions.

Examples of bullish and bearish divergence signals for trading strategies?

As we have explained above, there are four types of divergence signals, two of which are bullish and the other two bearish. We will show examples of trade setups that were generated by the four types. Below we’ll show some anecdotal charts explaining graphically how you potentially can develop divergence trading strategies. However, you need to backtest yourself before you commit any capital to your trading ideas!

Example 1: Classical bullish divergence signal on the Nasdaq 100 chart (March 2020)

Following the emergence of the Covid-19 pandemic, the equity market crashed over a period of one month or so.

During that crash, a classical bullish divergence — the price made a lower swing low while the RSI made a higher low — was formed on the Nasdaq 100 H4 chart in the last weeks of March 2020. On the 23rd of March, a hammer candlestick formed, which would have triggered those following the divergence to enter their long positions. What followed was a huge upward price gap and a massive rally that ended the pandemic market crash. See the chart below:

Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (6)
  • Do Candlesticks Pattern Work?
  • Study and Backtest Of All 75 Candlesticks

Example 2: Hidden bullish divergence signal on the TSLA chart (March 2020)

The same Covid-pandemic market crash created a hidden bullish divergence on the Tesla stock (TSLA) chart — on the D1 timeframe. The divergence is called hidden bullish because while the TSLA price made a higher swing low, the RSI oscillator made a lower low. That was followed by a tall bullish engulfing candlestick pattern, which would have been a good trade trigger for those watching the divergence.

What followed was the market rally that marked the recovery from the pandemic market crash. See the chart below: Note that the RSI also entered the oversold territory when the divergence occurred.

Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (7)

Example 3: Classical bearish divergence signal on the S&P 500 chart (February 2020)

Just before the Covid-19 pandemic was announced, the S&P 500 index H4 chart was showing a classical bearish divergence signal — the price made a higher swing high, while the RSI made a lower swing high.

Also, a harami candlestick pattern formed on the chart. A trader who was monitoring the divergence could have used the candlestick pattern as a trigger to enter a short position. That would have yielded a nice profit, as the market gaped down and crashed afterward following the news of the Covid pandemic.

Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (8)

Example 4: Hidden bearish divergence signal on the Nasdaq 100 chart (December 2018)

In early December 2018, the Nasdaq 100 H4 chart formed a bearish hidden divergence — the price made a lower swing high in a downtrend, while the RSI made a higher high. Looking at the chart, you would notice that a harami candlestick pattern occurred afterward, which would have been a good trigger to enter a short position. The market made a reasonable downswing that would have yielded a nice profit.

Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (9)

Divergence strategy, Settings, Trading rules, and Code

If you want to have the Amibroker code or the divergence strategy backtest explained in plain English, you need to order the following product:

The product has lots of code and trading ideas and gives you plenty of profitable trading strategies with a few modifications.

Ending remarks

Practically all articles about divergence trading strategies are followed by anecdotal graphs and how to trade them. But does any divergence trading strategy actually work? You have no idea until you actually sit down and backtest with solid trading rules and settings. In this article, we did. Our divergence strategy backtest shows that even simple ideas can get you a long way!

Divergency Trading Glossary

  1. Divergence: A key concept in divergence trading where the price of an asset moves in the opposite direction of an indicator.
  2. Bullish Divergence: A type of divergence where the price of an asset makes lower lows while the indicator makes higher lows, suggesting potential upward price movement.
  3. Bearish Divergence: A type of divergence where the price of an asset makes higher highs while the indicator makes lower highs, indicating potential downward price movement.
  4. MACD (Moving Average Convergence Divergence): An indicator that measures the difference between two moving averages to identify potential trends and divergences.
  5. RSI (Relative Strength Index): A momentum oscillator used to identify overbought and oversold conditions and potential divergences.
  6. Stochastic Oscillator: An oscillator used to identify potential reversals and divergences by comparing an asset’s closing price to its price range over a period.
  7. Crossover Divergence: A type of divergence where the price and the indicator lines cross each other, signaling a potential trend reversal.
  8. Hidden Divergence: A divergence where the price and the indicator move in the same direction, suggesting the current trend’s strength.
  9. Regular Divergence: A classic type of divergence where the price and the indicator move in opposite directions, indicating a potential trend reversal.
  10. Convergence: When the price and indicator move in the same direction, opposite of divergence.
  11. Leading Indicator: An indicator that provides signals before a price movement occurs.
  12. Lagging Indicator: An indicator that provides signals after a price movement has occurred.
  13. Oscillator: A type of indicator that fluctuates between two extreme values, often used in divergence trading.
  14. Support Level: A price level at which an asset tends to find buying interest and move higher.
  15. Resistance Level: A price level at which an asset tends to face selling pressure and move lower.
  16. Trendline: A line that connects the highs or lows of a price chart, used to identify trends and divergence points.
  17. Overbought: A condition in which an asset’s price is considered too high, often leading to a potential reversal.
  18. Oversold: A condition in which an asset’s price is considered too low, often leading to a potential reversal.
  19. Bull Market: A market characterized by rising prices and bullish sentiment.
  20. Bear Market: A market characterized by falling prices and bearish sentiment.
  21. Candlestick Pattern: A visual representation of price movements, used to identify potential reversals or continuation patterns.
  22. Volume: The number of shares or contracts traded in a market during a specific time frame.
  23. Divergence Confirmation: Additional signals or technical analysis used to confirm the presence of a divergence.
  24. Double Bottom: A chart pattern where the price reaches a low, bounces, then returns to a similar low before rising.
  25. Double Top: A chart pattern where the price reaches a high, pulls back, then returns to a similar high before declining.
  26. Triple Bottom: Similar to the double bottom, but with three low points.
  27. Triple Top: Similar to the double top, but with three high points.
  28. Breakout: When an asset’s price moves above a resistance level or below a support level, indicating a potential trend change.
  29. Pullback: A temporary reversal in price within an existing trend.
  30. Whipsaw: A situation where a trader gets caught in a losing trade due to a false divergence signal.
  31. Fibonacci Retracement: A tool used to identify potential support and resistance levels based on Fibonacci ratios.
  32. Moving Average: An indicator that calculates the average price of an asset over a specific period.
  33. Trend Confirmation: Additional analysis or indicators used to confirm an existing trend.
  34. Risk Management: Strategies and techniques to protect capital and manage potential losses.
  35. Position Sizing: Determining the appropriate size of a trade based on risk tolerance.
  36. Volatility: The degree of variation in an asset’s price over time.
  37. ADX (Average Directional Index): An indicator used to measure the strength of a trend.
  38. Parabolic SAR (Stop and Reverse): An indicator used to identify potential trend reversals.
  39. Hull Moving Average: A smoother moving average that reduces lag in price data.
  40. Williams %R: An oscillator used to identify overbought and oversold conditions.
  41. Moving Average Divergence Convergence (MADC): A variation of the MACD indicator used in divergence analysis.
  42. Choppy Market: A market with no clear trend, making divergence signals less reliable.
  43. ADX Divergence: A type of divergence using the Average Directional Index.
  44. Ichimoku Cloud: A comprehensive indicator used to identify trends and divergence.
  45. On-Balance Volume (OBV): An indicator that combines price and volume to identify divergence.
  46. ADX/DMI (Directional Movement Index): An indicator used to determine the strength of a trend.
  47. Falling Wedge: A bullish chart pattern that can lead to potential divergence signals.
  48. Rising Wedge: A bearish chart pattern that can lead to potential divergence signals.
  49. Zigzag Indicator: A tool used to filter out minor price movements and highlight major trends.
  50. Bollinger Bands: An indicator that measures price volatility and potential divergence points.
Divergence Trading Strategy: Overview, Rules, Backtest Analysis - Quantified Strategies (2024)
Top Articles
Understanding Digital Credit Cards and Their Alternatives
I’m a Frugal Millennial: Here’s How I Stay Focused on Saving Money
Melson Funeral Services Obituaries
Dricxzyoki
Le Blanc Los Cabos - Los Cabos – Le Blanc Spa Resort Adults-Only All Inclusive
What Are the Best Cal State Schools? | BestColleges
Mychart Mercy Lutherville
Body Rubs Austin Texas
Chris wragge hi-res stock photography and images - Alamy
Dee Dee Blanchard Crime Scene Photos
Athletic Squad With Poles Crossword
When Is the Best Time To Buy an RV?
Alejos Hut Henderson Tx
24 Hour Walmart Detroit Mi
Uc Santa Cruz Events
Maplestar Kemono
Locate At&T Store Near Me
Violent Night Showtimes Near Amc Fashion Valley 18
3S Bivy Cover 2D Gen
R Personalfinance
Nine Perfect Strangers (Miniserie, 2021)
Jang Urdu Today
Mccain Agportal
Aerocareusa Hmebillpay Com
Busted Mcpherson Newspaper
Belledelphine Telegram
Lovindabooty
Ou Football Brainiacs
Cable Cove Whale Watching
Tomb Of The Mask Unblocked Games World
Mobile crane from the Netherlands, used mobile crane for sale from the Netherlands
Kiddie Jungle Parma
Red Sox Starting Pitcher Tonight
Restaurants Near Calvary Cemetery
Housing Assistance Rental Assistance Program RAP
Www Craigslist Com Shreveport Louisiana
Compress PDF - quick, online, free
Black Adam Showtimes Near Amc Deptford 8
Consume Oakbrook Terrace Menu
Hermann Memorial Urgent Care Near Me
3400 Grams In Pounds
Skip The Games Grand Rapids Mi
Invalleerkracht [Gratis] voorbeelden van sollicitatiebrieven & expert tips
Coffee County Tag Office Douglas Ga
Brother Bear Tattoo Ideas
Professors Helpers Abbreviation
Haunted Mansion (2023) | Rotten Tomatoes
Haunted Mansion Showtimes Near Millstone 14
Ronnie Mcnu*t Uncensored
Grand Park Baseball Tournaments
Solving Quadratics All Methods Worksheet Answers
Uno Grade Scale
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 5634

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.