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が提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。