T29 Delta Divergence

Feature Summary

  • Detects divergences between price and cumulative delta bars
  • Supports both hidden and regular divergence
  • Works with Sierra Chart's built in Cumulative Delta Bars studies
  • Seeks divergence between swing points
  • Supports filtering for slope
  • Supports filtering for line breach
  • User controlled number of swings lookback


Sierra Chart's Cumulative Delta Bars and Setting the CD Reference

Sierra Chart comes built in with several Cumulative Delta studies. These include the "Cumulative Delta Bars - Trades", "Cumulative Delta Bars - Up/Down Ticks Volume" and "Cumulative Delta Bars - Volume".

Add to the chart, the study includes a setting to point to point to any one of these.


Peaks, Pivots, Swings and Sensitivities

The study uses swings to find peaks on the charts. It then analyses for divergence between the peaks.

Peaks in this context is synonymous to swings or pivots. These terms are used here interchangeably.

In the documentation, the 1st peak refers to the swing that is on the left hand side of the chart and the 2nd peak refers to the swing that is on the right hand side.

Once we have a confirmed divergence, the study will draw the lines between the two peaks

Peaks are based on swings

The peaks are based on swing points. See the SC's "Swing High and Low" study for reference.

The swing size is controlled using the sensitivity setting.

  • Swing Sensitivity - the number of bars that make up a swing. For a swing low, a value of 5 means that there are at least 5 bars on each side that have higher lows.
  • Trigger Sensitivity - the number of bars needed to confirm peak 2's right hand side

Hidden and Regular Divergence Types

The study detects both regular and hidden divergence:

Regular

  • Bullish - price is making lower lows, cumulative delta is making higher lows
  • Bearish - price is making higher highs, cumulative delta is making lower highs

Hidden

  • Bullish - price is making higher lows, cumulative delta is making lower lows
  • Bearish - price is making lower highs, cumulative delta is making higher highs


Early Detection on the 2nd Peak

The 2nd peak is defined by two settings - the "Swing Sensitivity" and the "Trigger Sensitivity".

The reason for that is to allow for a mix of detecting peaks that have advanced enough in one direction but to get an early alert without having to wait for the full pattern to form.

Determine How Far Back to Search for a Peak1

Allow Divergence Peaks To Span Multiple Trading Sessions

Divergence Lookback Number of Peaks

Divergence Lookback Use Nearest/Furthest

Filtering for Slopes

Minimum Price Difference Units, Minimum Price Difference

Minimum Cumulative Delta Difference Units, Minimum Cumulative Delta Difference

Filtering Divergence Line Breaches

Say we have peaks 1 and 2 and a divergence line between them. A breach of the line can occur when on some bar in the middle touches the line. See image below for an example of that.

Filter For Price Breaching Divergence Line, Filter For Cumulative Delta Breaching Divergence Line

These settings have 3 options:

  • Disabled - divergence line breaches are allowed
  • On Touch - a line that is touched by any bar will be filtered
  • On Closing Basis - a bar must close on the other side of the line for it to be filtered

Searching for Pivots on Cumulative Delta

"Cumulative Delta Pivot Required", "Cumulative Delta Pivot Alignment Lookback"

The settings relate to how swings are matched between price and CD. For example, say you have 2 swing lows on the main price chart, peak1 on the left and peak2 on the right. 

The question is then what do you measure against on the CD delta bars? Which bars to use?

Looking down to CD, the peaks on CD are often exactly on the same bars as the price chart but sometimes they are not. In other words, we often see peak1 and peak2 on CD that are exactly in alignment with the peaks on price.  In these cases its easy to say that we use the same bars on both price and CD to measure divergence.

But what happens if they don't align on the exact same bar? One option might be to use the same bars as price regardless if these line up. The other option is to attempt to line them up by looking 1-2 bars to the left and right and trying to find a peak to use. This latter option is what a human would most likeky do.

These 2 settings you control this behavior:

  1. "Cumulative Delta Pivot Required" - when set to no, then no attempt is made to find a peak. Divergence measurement is done strictly looking at the price bars and then using those same bard for CD regardless of swing alignment. When set to yes, an attempt is made to find a swing x bars back
  2. Alignment Lookback - how many bars to lookback


Tips for Lowering Resource Usage (TBD)

Visual Settings

CD Graph Region - the region on the chart where the Cumulative Delta study is displaying. The study uses this setting to plot the cumulative delta divergence lines.

Draw Divergence Lines On the Chart - enable/disable drawing the diverence lines on the chart

Bullish Line Color, Bearish Line Color, Divergence Line Width - set the divergence line formats

Arrow Offset - divergence signals are plotted as arrow subgraphs above/below the bar. Set the display offset moving the arrow away from the bar as needed.

Subgraphs

SubgraphDescription
Regular Bullish Divergence, Regular Bearish DivergenceRegular divergence triggered
Hidden Bullish Divergence, Hidden Bearish DivergenceHidden divergence detected
Price Diff Points Holds the price difference in points between peak 1 and peak 2
Cumulative Delta Diff PointsHolds the cumulative delta difference in points between peak 1 and peak 2
Price Diff PointsHolds the price difference in percent between peak 1 and peak 2
Cumulative Delta Diff PointsHolds the cumulative delta difference in percent between peak 1 and peak 2