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. اقرأ المزيد في شروط الاستخدام.