Orderflow
Delta Divergence
A study you add to a chart. Ready-made charts are in the chartbook shop.
Description
Delta Divergence draws a line when price makes a new swing and cumulative delta does not confirm it. Cumulative delta is ask volume minus bid volume, added up through the bar. A red line joins two swing highs when the later high is higher and the delta total is lower. A blue line joins two swing lows when the later low is lower and the delta total is higher.
Key Notes
- A swing is used only after the bars on both sides have closed. The line is not moved after that.
- The line runs from one swing to the next. Later swings that keep diverging the same way are not added, until a swing of that kind does not diverge.
- A bullish line and a bearish line that cover any of the same bars are both left off.
- The two swings have to share the same cumulative-delta total. With the daily reset on, that means they have to be in the same trading day.
- The horizontal swing lines are off unless extension is turned on. Swing High and Swing Low are not plotted. They only style those lines.
Important Inputs
| Input | What it does |
|---|---|
| Length | 5. Bars on each side of the swing. |
| Minimum Price Ticks | 1. The later swing must clear the earlier one by at least one tick. |
| Minimum Delta | 0. Any real disagreement in the cumulative total qualifies. |
| Reset At Start Of Trading Day | Yes. |
| Bars To Load | 400. Set to 0 to search every loaded bar. |