OPEN-SOURCE SCRIPT
Updated

COT Non-Commercial Net Positions

1 529
This indicator displays the net position of Non-Commercial traders (speculators) in futures markets by subtracting short positions from long positions, based on CFTC COT data. It fetches the relevant COT long and short values weekly (or as per the user-selected timeframe) and plots the net positions relative to zero.
Release Notes
I added lookahead=barmerge.lookahead_on to the request.security calls.
This allows the script to display the most recent COT data immediately, instead of waiting for the weekly bar to close.
Release Notes
This indicator is designed to work with CME futures, such as 6E1! for EUR.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.