TradingView
TradingView
Jan 17, 2022 5:43 PM

Commitment of Traders: Legacy Metrics 

E-mini S&P 500 FuturesCME

Description

█ OVERVIEW

This indicator displays the Commitment of Traders (​COT) legacy data for futures markets.


█ CONCEPTS

Commitment of Traders ​(​COT) data is tallied by the Commodity ​Futures Trading Commission (CFTC), a US federal agency that oversees the trading of derivative markets such as futures in the US. It is weekly data that provides traders with information about open interest for an asset. The CFTC oversees derivative markets traded on different exchanges, so ​COT data is available for assets that can be traded on CBOT, ​CME, NYMEX, COMEX, and ICEUS.

A detailed description of the COT report can be found on the CFTC's website.

COT data is separated into three notable reports: Legacy, Disaggregated, and Financial. This indicator presents data from the legacy report, which is broken down by exchange. Legacy reports break down the reportable open interest positions into two classifications: non-commercial and commercial traders.

Our other COT indicators are:
 • Commitment of Traders: Disaggregated Metrics
 • Commitment of Traders: Financial Metrics
 • Commitment of Traders: Total


█ HOW TO USE IT

Load the indicator on an active chart (see here if you don't know how).

By default, the indicator uses the chart's symbol to derive the COT data it displays. You can also specify a CFTC code in the "CFTC code" field of the script's inputs to display COT data from a symbol different than the chart's.

The rest of this section documents the script's input fields.

Metric
Each metric represents a different column of the Commitment of Traders report. Details are available in the explanatory notes on the CFTC's website.
Here is a summary of the metrics:
 • "Open Interest" is the total of all futures and/or option contracts entered into and not yet offset by a transaction, by delivery, by exercise, etc.
  The aggregate of all long open interest is equal to the aggregate of all short open interest.
 • "Traders Total" is the number of all unique reportable traders, regardless of the trading direction.
 • "Traders Total Reportable/Traders Noncommercial/Traders Commercial" are the quantities of traders reported to hold any position with the specified direction.
  All of a trader's reported futures positions in a commodity are classified as commercial if the trader uses futures contracts in that particular commodity for hedging.
  To determine the total number of reportable traders in a market, a trader is counted only once, whether or not the trader appears in more than one category.
 • "Total Reportable/Noncommercial/Commercial Positions" are all positions held by all reportable/non-commercial/commercial traders.
 • "Non-reportable Positions" is derived by subtracting total long and short "Reportable Positions" from the total open interest.
  Accordingly, the number of traders involved and the commercial/non-commercial classification of each trader are unknown.
 • "Concentration Gross/Net LT 4/8 TDR" is the percentage of open interest held by 4/8 of the largest traders, by gross/net positions,
  without regard to whether they are classified as commercial or non-commercial. The Net position ratios are computed after offsetting each trader’s equal long and short positions.
  A reportable trader with relatively large, balanced long and short positions in a single market, therefore,
  may be among the four and eight largest traders in both the gross long and gross short categories, but will probably not be included among the four and eight largest traders on a net basis.

Direction
Each metric is available for a particular set of directions. Valid directions for each metric are specified with its name in the "Metric" field's dropdown menu.

Type
Possible values are: All, Old, Other. When commodities have a well-defined marketing season or crop year (e.g. Wheat or Lean Hogs futures), this determines how the data is aggregated. Detailed explanation can be found in the "Old and Other Futures" section of the CTFC Explanatory Notes linked above. The "Major Markets for Which the COT Data Is Shown by Crop Year" table in the Explanatory Notes specifies the commodities that this distinction applies to; selecting "Old" for any of the commodities not in that list will return the same data as in "All", while selecting "Other" will return 0.

COT Selection Mode
This field's value determines how the script determines which COT data to return from the chart's symbol:
- "Root" uses the root of a futures symbol ("ES" for "ESH2020").
- "Base currency" uses the base currency in a forex pair ("EUR" for "EURUSD").
- "Currency" uses the quote currency, i.e., the currency the symbol is traded in ("JPY" for "TSE:9984" or "USDJPY").
- "Auto" tries all modes, in turn.
If no COT data can be found, a runtime error is generated.
Note that if the "CTFC Code" input field contains a code, it will override this input.

Futures/Options
Specifies the type of Commitment of Traders data to display: data concerning only Futures, only Options, or both.

CTFC Code
Instead of letting the script generate the CFTC COT code from the chart and the "COT Selection Mode" input when this field is empty, you can specify an unrelated CFTC COT code here, e.g., 001602 for wheat futures.



Look first. Then leap.

Release Notes

Minor update to import the latest version of "LibraryCOT"
Comments
HPotter
Cool!
NegativeIQTrader
how about if i just want to plot commercial longs without the input settings??
Toru
Hello, I really like this library.

It seems TradingView Library does not reflect the latest data that Quandl (Nasdaq currently) does.

Is there a plan to update? Thanks!

tradince
@Toru, its shifted by one day
Toru
@tradince, indeed!
teutates
@Toru, hi, is this solved?
Toru
@teutates, seems like itis solved. By the way nasdaq stopped providing qua dl data after buy out. Now tradingview library is the last resort.
teutates
@Toru, Yes i noticed that after 1.1.24.. thats shame. Since data is provided free of charge every friday.
95% of the indicators here at Tradingview that used this QUANDL COT data are not working of course. And no one will recode them again so soon...
strongRock17983
I'm just curious, how is possible that the Dax future's COT data is available through this script?
I can't find DAX future COT data from the CFTC website.. Can somebody help?
More