OPEN-SOURCE SCRIPT

COT Index Indicator

114
1) One‑liner
My version of the OTC COT Index indicator: a 0–120 oscillator built from CFTC COT data that shows where Commercial, Noncommercial, and Nonreportable net positions sit relative to recent extremes.

2) Short paragraph
This is my version of the OTC COT Index indicator. It converts CFTC Commitments of Traders (COT) net positions into a normalized 0–120 oscillator for each trader group—Commercials, Noncommercials, and Nonreportables—so you can quickly see when positioning is near recent highs or lows. Data comes from TradingView’s official COT library and supports both “Futures Only” and “Futures and Options” reports.

3) Compact bullets
What: My version of the OTC COT Index indicator
Why: Quickly spot when trader groups are near positioning extremes
Data: CFTC COT via TradingView/LibraryCOT/2; Futures Only or Futures & Options
How: Index = 120 × (Current − Min) ÷ (Max − Min) over a configurable lookback
Plots: Commercials (blue), Noncommercials (orange), Nonreportables (red)
Lines: Overbought, Midline, Oversold, optional 0/100, upper/lower bounds
Note: Values are relative to the chosen window; not trading advice
4) Publication‑ready (sections)
Overview

My version of the OTC COT Index indicator. It turns CFTC COT positioning into a 0–120 oscillator per trader group (Commercials, Noncommercials, Nonreportables) to highlight relative extremes.
Data source

CFTC Commitments of Traders via TradingView’s official library (TradingView/LibraryCOT/2).
Supports “Futures Only” and “Futures and Options.”
Method

Net positions = Longs − Shorts.
Index = 120 × (Current Net − Min(Net, Lookback)) ÷ (Max(Net, Lookback) − Min(Net, Lookback)).
Inputs

Weeks Look Back (normalization window)
Weeks Look Back for Historical Hi/Los (longer reference)
Report Type selection
Visuals

Three indexes by trader group, plus reference levels (OB/OS, Midline, optional 0/100).
Notes

Some symbols map to specific CFTC codes for reliability.
If no relevant COT data exists for the symbol, the script reports it clearly.
If you want this adapted to a specific platform’s character limits (e.g., TradingView’s publish dialog), tell me the target length and I’ll trim it to fit.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.