Divergence - Support Resistance

Divergence-Support/Resistence
Divergence-Support/Resistence

The question which comes up quite often is that - "What is the probability of divergence resulting in a change of trend?" This is a hard nut and it can be devastating to follow divergence signals without other confirmations. At best, divergences can act as good support and resistance levels. This indicator treats divergence as a support resistance level and plots them on the chart. Though we are the ones who coined this concept, it has become very popular and also earned us another Editor Pick.

Link to the Indicator: Divergence - Support Resistance

Concept of Divergence-Based Support Resistance

This idea started with two concepts:

  • Support and resistance are simply levels where the price has rejected to go further down or up. Usually, we can derive this based on pivots. But, if we start looking at every pivot, there will be many of them and may be confusing to understand which one to consider.
  • Lot of people asked about one of my previous scripts on divergence detector on how to use it. I believe divergence should be considered as an area of support and resistance because they only amount to temporary weakness in momentum and nothing more. As per my understanding

Trend > Hidden Divergence > Divergence > Oscillator Levels of Overbought and Oversold

Process of deriving Divergence Based Support Resistance

Now combining the above two concepts - what we are trying to do here is draw support resistance lines only on pivots that have observed either divergence or hidden divergence. Continuation and indecision pivots are ignored.

Input requires only a few parameters.

Divergence Based Support Resistance - Input Settings
Divergence-Based Support Resistance - Input Settings

Zigzag lengths and oscillator to be used. Oscillator periods are automatically calculated based on zigzag length. Hence no other information is required. You can also choose a custom oscillator via an external source.

  • Display includes horizontal lines of support/resistance which are drawn from the candle from where divergence or hidden divergence is detected.
  • Support resistance lines are coloured based on divergence. Green shades for bullish divergence and bullish hidden divergence whereas red shades for bearish divergence and bearish hidden divergence. Please note, red and green lines do not mean they only provide resistance or support. Any lines which are below the price should be treated as support and any line which are above the price should be treated as resistance.
  • Divergence symbols are also printed on the bar from where divergence/hidden divergence is detected.

↗ - Bullish Hidden Divergence

↘ - Bearish Hidden Divergence
⤴ - Bullish Divergence
⤵ - Bearish Divergence
 
The script also demonstrates the usage of libraries effectively. I have used the following libraries in this code.
 
import HeWhoMustNotBeNamed/ zigzag /2 as  zg
import HeWhoMustNotBeNamed/enhanced_ta/8 as eta
import HeWhoMustNotBeNamed/ supertrend /4 as st

Can be a good combination to use with harmonic patterns.

 

Harmonic Pattern with Divergence Based Support Resistance
Harmonic Pattern with Divergence Based Support Resistance

 

Comments