OPEN-SOURCE SCRIPT

Adjusted CoT Index

Adjusted COT Index

  • Improves upon: "COT Index Commercials vs large and small Speculators" by SystematicFutures
  • How: CoT Indexes are adjusted by Open Interest to normalise data over time, and threshold background colours are in-line with Larry Williams recommendations from his book.


Note: This indicator is **only** accurate on the Daily time-frame due to the mid-week release date for CoT data.

This script calculates and plots the Adjusted Commitment of Traders (COT) Index for Commercial, Large Speculator, and Retail (Small Speculator) categories.

The CoT Index is adjusted by Open Interest to normalise data through time, following the methodology of Larry Williams, providing insights into how these groups are positioned in the market with an arguably more historically accurate context.

COT Categories
-------------------
- Commercials (Producers/Hedgers): Large entities hedging against price changes in the underlying asset.
- Large Speculators (Non-commercials): Professional traders and funds speculating on price movements.
- Retail Traders (Nonreportable/Small Speculators): Small individual traders, typically less informed.

Features
----------
- Open Interest Adjustment
- The net positions for each category are normalized by Open Interest to account
for varying contract sizes.
- Customisable Look-back Period
- You can adjust the number of weeks for the index calculation to control the
historical range used for comparison.
- Thresholds for Extremes
- Upper and lower thresholds (configurable) are provided to mark overbought and
oversold conditions.
- Defaults
- Overbought: <=20
- Oversold: >= 80
- Hide Current Week Option
- Optionally hide the current week's data until market close for more accurate comparison.
- Visual Aids
- Plot the Commercials, Large Speculators, and Retail indexes, and optionally highlight extreme positioning.

Inputs
--------
- weeks
- Number of weeks for historical range comparison.
- upperExtreme and lowerExtreme
- Thresholds to identify overbought/oversold conditions (default 80/20).
- hideCurrentWeek
- Option to hide current week's data until market close.
- markExtremes
- Highlight extremes where any index crosses the upper or lower thresholds.
- Options to display or hide indexes for Commercials, Large Speculators, and Small Speculators.

Outputs
----------
- The script plots the COT Index for each of the three categories and highlights periods of extreme positioning with customisable thresholds.

Usage
-------
- This tool is useful for traders who want to track the positioning of different market participants over time.
- By identifying the extreme positions of Commercials, Large Speculators, and Retail traders, it can give insights into market sentiment and potential reversals.
- Reversals of trend can be confirmed with RSI Divergence (daily), for example
- Continuation can be confirmed with RSI overbought/oversold conditions (daily), and/or hidden RSI Hidden Divergence, for example
Commitment of Traders (COT)CyclesWilliams %R (%R)

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


更多:

免责声明