OPEN-SOURCE SCRIPT

COT TRADERS NET (COCOSTA)

901
COT TRADERS NET (COCOSTA) plots the net number of reportable traders — Long traders minus Short traders — from the CFTC's Commitment of Traders (Financial) report, futures-only.

Instead of tracking position size (contracts/lots), this indicator tracks how many traders are on each side of the market. A rising net count means more distinct traders are building long exposure than short, independent of how large any single trader's position is — a different lens on crowd positioning than the standard net-contracts view.

Traders category (switchable):

Dealer
Asset Manager
Leveraged Funds
Other Reportable
Total Reportable
How it works

Data source: CFTC Commitment of Traders, Financial report, futures-only (options excluded).
For the selected category, the script requests the number of Long traders and the number of Short traders, then plots Net = Long traders − Short traders as a step line.
The zero line marks the balance point between long-leaning and short-leaning trader counts.
Line color flips between the "Net ≥ 0" and "Net < 0" colors (both configurable) so directional shifts are visible at a glance.
The CFTC code is auto-detected from the chart's symbol by default; you can override it by symbol or enter a custom CFTC code.
Inputs

Traders category — pick which group's net trader count to display.
CFTC source — Symbol (auto) or Custom CFTC code.
Symbol / CFTC code override fields.
Net ≥ 0 / Net < 0 colors.
Notes

COT data updates weekly (Friday release, as-of Tuesday), so this indicator is best used on daily and higher timeframes.
Requires the CFTC to publish a Financial-category report for the underlying instrument; not all symbols have Financial COT data available.
Built on top of TradingView's official LibraryCOT.
Pine Script®

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.