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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.