Finds momentum divergences and tells you how often they've actually resolved — measured across 12 markets and 26 years of CFTC data, against a base rate. It doesn't tell you to buy or sell. It validates its own claim so you can weigh it against your own system.
The intuitive way to build a COT divergence tool is to look for divergence between price and positioning — and that is how most COT tools would ship it. We built it that way, tested it across 12 markets and 26 years, and it does not work:
| Divergence detected on… | 2 wk lift | 3 wk | 4 wk | Markets positive |
|---|---|---|---|---|
| Positioning (the intuitive build) | −2.4 | −2.5 | −3.2 | 3–5 / 12 |
| Stochastic (what this ships) | +7.2 | +4.8 | +4.6 | 10 / 12 |
Both rows are the ungated signal, so the two builds are compared like for like. The 2-week column is the window everything else in this guide uses; the 3- and 4-week columns are shown only to make the point that the positioning build is negative at every horizon, not just the one we picked.
Negative lift at every window means that claim is worse than random. So this indicator does it the other way round: divergence is detected on the 9-3-3 stochastic, and COT positioning is the gate rather than the divergence series.
Resolution is defined as: price makes a 4-week extreme in the signal's direction within 2 weekly reports. The base rate is how often that happens from any randomly chosen bar — that's the control, and the difference between them is the only number that means anything.
| Signal | Resolved | Base rate | Lift | Markets | Sample |
|---|---|---|---|---|---|
| BEAR — stoch bearish divergence with specs crowded long | 54% | 45% | +8.8 | 9 / 12 | 87 |
| BULL — stoch bullish divergence, ungated | 58% | 50% | +8.0 | 11 / 12 | 198 |
These are the figures the shipped engine earns. The pivot is compared on the high and low of the bar, which is what the Pine does. An earlier study compared closes and produced a different, slightly lower set; those numbers are retired and appear nowhere in this product.
Adding the COT gate helps one side and destroys the other:
| Ungated | With COT gate | Verdict | |
|---|---|---|---|
| Bear divergence | +7.2 | +8.8 | gate ON by default |
| Bull divergence | +8.0 | +0.5 (3/9 mkts) | gate OFF by default |
The bull row's 9 is not a typo against the 12-market universe elsewhere: the backtest drops any market with fewer than five gated signals, and gating the bull side leaves only nine markets with enough to measure. That thinning is itself part of why the gate hurts.
Both gate toggles are exposed in Settings so you can reproduce the failure yourself. Turning the bull gate on will make the indicator worse — it's there for verification, not tuning.
Split at 2010: fitted before, checked on 2010–2026 untouched.
| Signal | Full sample | Before 2010 | 2010–2026 |
|---|---|---|---|
| BULL, ungated | +8.0 (n=198) | −2.4 (n=34) | +8.2 (n=140) |
| BEAR, gated | +8.8 (n=87) | not testable — only 5 gated signals, in a single market | |
| BEAR, ungated (reference) | +7.2 (n=250) | +12.0 | +4.8 |
| Row | What it tells you |
|---|---|
| Stochastic | Current %K with a meter, plus overbought / oversold / mid. The meter colour and the word are driven by the same rule, so they can never disagree. This is the series divergences are measured on. |
| Positioning | The COT index 0–100 and its crowding state, in gold. When it reads CROWDED LONG · gate armed, bear divergences are permitted. Gold means at an extreme, not bearish. |
| BEAR divs / BULL divs | How many of each have fired across the loaded history on this market. Each label and its count sit in one coloured chip, so the number always belongs to the word beside it. |
| Resolved on this chart | The important one. Of the divergences on your chart, how many resolved within 2 reports. Compare it to the 54–58% published figures. Expect variance — a single market is a small sample. |
| Verdict row | Plain English, with the measured rate attached. Stays lit for six bars after a signal. |
| Config line | Stochastic length, pivot settings, and whether each gate is in its tested position. |
67% of 33 signals — above the pooled 54–58%. That's a favourable market, not proof the indicator is better than published. Check several markets before drawing conclusions.| Setting | Default | What it does |
|---|---|---|
| Pivot left / right | 3 / 3 | How many reports either side define a peak. Tested 2/2 through 5/5 — all positive; 3/3 strongest on the bear side. Right also sets the confirmation lag. |
| Stochastic %K length | 9 | The 9-3-3 stochastic default. Changing it invalidates the published statistics. |
| Max reports between peaks | 52 | Two peaks further apart than this won't be paired. |
| Keep last N divergences | 12 | Older lines are deleted so long look-backs don't turn into spaghetti. |
| Gate BEAR on crowded longs | ON | The tested configuration. Off drops the lift from +8.8 to +7.2. |
| Gate BULL on crowded shorts | OFF | The tested configuration. On drops it from +8.0 to +0.5, positive in only 3 of the 9 markets that produce enough gated signals to measure. |
| Positioning line | on | The gold gate series. Turning it off hides the line, not the gate. |
| Price percentile line | off | Context only — where price sits in its own range. Takes no part in the signal. |
| Connect the diverging peaks | on | Draws the two lines that make the divergence visible. |
| Arrows on the price chart | on | Mirrors each signal onto the price pane. |
| Crowded LONG / SHORT levels | 80 / 20 | Percentile thresholds for the gate and the shading. |
| COT Index lookback | 156 | Weekly reports used to rank positioning. 156 ≈ 3 years, the classic setting. |
| Include options data | off | Futures-only is the COTVault standard and matches the dashboard. Turning this on makes the two disagree. |
| Data box position / size | Top right / Normal | Eight anchor points. Compact keeps the header, the Stochastic row, the verdict and the link, and drops the detail rows in between. |
| Show the full guide on the chart | off | Renders the on-chart manual as a panel. TradingView always drops the ⓘ tooltip downward, so it runs off screen when the data box sits low — this is the way around it. |
| Guide position / text size | Middle left / Small | Nine anchor points, independent of the data box so the two never collide. |
Three alert conditions ship with the indicator. Add them the normal way — right-click the chart, Add alert, then pick the condition from the dropdown.
| Alert | Fires when |
|---|---|
| BEARISH divergence (gated) | A bear divergence confirms with specs crowded long. The message carries the measured rate so the alert itself states its own accuracy. |
| BULLISH divergence | A bull divergence confirms. Ungated, which is the tested configuration. |
| New COT report ingested | A fresh weekly CFTC release lands — useful as a Friday review prompt rather than a trade signal. |
Set alerts to Once per bar close. A divergence confirms on the pivot-right lag, so an intrabar alert would fire on a peak that can still un-form.
This indicator is context, not a trade trigger. It answers one question — "is momentum diverging, and how often does that resolve?" — and hands the entry decision back to you.
One colour language runs across the whole COTVault suite, so a colour never means two things:
| Colour | Meaning |
|---|---|
| GOLD | A state, never a direction. Positioning is at an extreme, and inside crowded-long the bear gate is armed. Gold does not mean bearish — that claim was tested at 46.7% against a 45.2% base rate and rejected. |
| RED | A bearish signal has actually fired — a BEAR divergence line, tag and arrow. |
| TEAL | A bullish signal has actually fired. |
| SLATE | Neutral. Nothing measured is happening. |
In the panel a meter's colour always matches the word printed beside it — if they ever disagree, that is a bug worth reporting. The stochastic line in the pane is the one exception: it keeps a continuous teal→blue→red heat ramp, because there it is a thermometer showing level, not a verdict. That is the ordinary convention for reading an oscillator and it makes no COT claim — unlike the gate bands, which are gold, because crowding arms a gate rather than pointing a direction.
pivot right reports after it forms — three weeks at the default. This lag is inherent to pivot detection and cannot be removed by any indicator.