Greeny

COT (Legacy): Open Interest

Open Interest from legacy commitment of traders ( COT ) report. For the main symbol but also allows to override it. Also allows to include options in consideration.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
study("Open Interest", shorttitle="OI", precision=0)
force_root = input("", title="Override Product")
is_includeoptions = input(false, type=bool, title="Include Options")

fxroot =
	  ticker == "USDCAD" ? "CD" : 
	  ticker == "USDCAD" ? "CD" : 
	  ticker == "USDCHF" ? "SF" : 
	  ticker == "USDCZK" ? "CZ" : 
	  ticker == "USDHUF" ? "FR" : 
	  ticker == "USDILS" ? "IS" : 
	  ticker == "USDJPY" ? "JY" : 
	  ticker == "USDMXN" ? "MP" : 
	  ticker == "USDNOK" ? "UN" : 
	  ticker == "USDPLN" ? "PZ" : 
	  ticker == "USDRUB" ? "RU" : 
	  ticker == "USDSEK" ? "SE" : 
	  ticker == "USDZAR" ? "RA" : 
	  ticker == "EURUSD" ? "EC" : 
	  ticker == "AUDUSD" ? "AD" : 
	  ticker == "GBPUSD" ? "BP" : 
	  ticker == "NZDUSD" ? "NE" : 
	  ticker == "BRLUSD" ? "BR" : 
	  ""
root = force_root == "" ? fxroot == "" ? syminfo.root : fxroot : force_root
code = root + (is_includeoptions ? "_FO" : "_F") + "_L_ALL"

oi = security("QUANDL:CFTC/"+code+"|0", "D", close)

plot(oi, color = gray, title="OI")

Kommentarer

HI Greeny! can you explain how to add the OI to the gold chart for example?
+12 Svara
Greeny LEONES
Thanks for asking! Here you are:
1. Apply this script to the chart
2. Switch the GC1!
3. Go to the indicator settings and change Net style from histogram to line.
+13 Svara
LEONES Greeny
@Greeny, Hi Greeny, do you know why this is not working anymore? OI doesn't show up anymore
+7 Svara
Hi Greeny! Please tell me how to run your indicator for EURUSD - BOptions?
+9 Svara
Hi Greeny,

Love your work. I'm just enquiring about how the OI figures are calculated as per this example:

Copper futures HG1!

OI as per CME group 24th June is recorded as 255,073 while the indicator will show 280 640.

Regards

Evahn
+8 Svara
Hello, can you explain how to add this indicator to the grains, such as wheat, corn, soybeans. Thank you
+1 Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Hur det fungerar Diagramfunktioner Priser Tipsa en vän Ordningsregler Hjälpcenter Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Hänvisade vänner Mynt Mina kölappar Hjälpcenter Privata meddelanden Chatt Logga ut