OPEN-SOURCE SCRIPT
COT: CTA POSITIONING

COT: CTA POSITIONING
A comprehensive Commitment of Traders (COT) indicator that tracks institutional money manager positioning across futures markets. This indicator displays CTA (Commodity Trading Advisor) net positioning as a percentile rank, helping traders identify potential market extremes and contrarian opportunities.
Key Features:
Multi-Market Coverage: Automatically detects and displays COT data for 60+ futures contracts across equity indices, bonds, currencies, cryptocurrencies, metals, energy, grains, livestock, and softs
Percentile Rank Display: Shows CTA net positioning (long minus short) as a percentile over a customizable lookback period (default 156 weeks ≈ 3 years)
Extreme Zones: Visual highlighting of potential reversal zones when CTAs reach positioning extremes (>80th percentile = bearish, <20th percentile = bullish)
Liquidity Analysis Table (optional): Displays detailed positioning breakdown including:
Gross long and short positions
Net positioning
20-day average volume
Net position as % of average daily volume
Estimated days to unwind net position
Methodology:
The indicator pulls CFTC Commitment of Traders data from both Financial Traders (COT3) and Disaggregated (COT2) reports, focusing specifically on leveraged money managers (CTAs/hedge funds). It calculates:
Net Positioning = CTA Longs - CTA Shorts
Net as % of Open Interest
Percentile rank of current net positioning vs. lookback period
Interpretation:
High readings (>80): CTAs are extremely net long - potential bearish reversal signal
Low readings (<20): CTAs are extremely net short - potential bullish reversal signal
Works best as a contrarian indicator on weekly timeframes
Consider liquidity metrics to assess position size relative to market capacity
Settings:
Lookback Period: Adjustable percentile calculation window (default 156 periods)
Show Table: Toggle detailed positioning and liquidity data display
Supported Markets:
Equity Indices (ES, NQ, RTY, YM), Treasuries (ZT, ZF, ZN, ZB, UB), Currencies (6E, 6J, 6B, 6C, 6A), Crypto (BTC, ETH), Metals (GC, SI, HG, PL, PA), Energy (CL, NG, RB, HO, BZ), Grains (ZC, ZW, ZS, ZM, ZL), Livestock (LE, HE, GF), and Softs (SB, CT, KC, CC, OJ)
Note: COT data is released weekly on Fridays and reflects positions as of Tuesday close. This indicator works best on daily or weekly timeframes.
Data sourced from CFTC Commitment of Traders reports via TradingView's COT library.
A comprehensive Commitment of Traders (COT) indicator that tracks institutional money manager positioning across futures markets. This indicator displays CTA (Commodity Trading Advisor) net positioning as a percentile rank, helping traders identify potential market extremes and contrarian opportunities.
Key Features:
Multi-Market Coverage: Automatically detects and displays COT data for 60+ futures contracts across equity indices, bonds, currencies, cryptocurrencies, metals, energy, grains, livestock, and softs
Percentile Rank Display: Shows CTA net positioning (long minus short) as a percentile over a customizable lookback period (default 156 weeks ≈ 3 years)
Extreme Zones: Visual highlighting of potential reversal zones when CTAs reach positioning extremes (>80th percentile = bearish, <20th percentile = bullish)
Liquidity Analysis Table (optional): Displays detailed positioning breakdown including:
Gross long and short positions
Net positioning
20-day average volume
Net position as % of average daily volume
Estimated days to unwind net position
Methodology:
The indicator pulls CFTC Commitment of Traders data from both Financial Traders (COT3) and Disaggregated (COT2) reports, focusing specifically on leveraged money managers (CTAs/hedge funds). It calculates:
Net Positioning = CTA Longs - CTA Shorts
Net as % of Open Interest
Percentile rank of current net positioning vs. lookback period
Interpretation:
High readings (>80): CTAs are extremely net long - potential bearish reversal signal
Low readings (<20): CTAs are extremely net short - potential bullish reversal signal
Works best as a contrarian indicator on weekly timeframes
Consider liquidity metrics to assess position size relative to market capacity
Settings:
Lookback Period: Adjustable percentile calculation window (default 156 periods)
Show Table: Toggle detailed positioning and liquidity data display
Supported Markets:
Equity Indices (ES, NQ, RTY, YM), Treasuries (ZT, ZF, ZN, ZB, UB), Currencies (6E, 6J, 6B, 6C, 6A), Crypto (BTC, ETH), Metals (GC, SI, HG, PL, PA), Energy (CL, NG, RB, HO, BZ), Grains (ZC, ZW, ZS, ZM, ZL), Livestock (LE, HE, GF), and Softs (SB, CT, KC, CC, OJ)
Note: COT data is released weekly on Fridays and reflects positions as of Tuesday close. This indicator works best on daily or weekly timeframes.
Data sourced from CFTC Commitment of Traders reports via TradingView's COT library.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。