giancapino

Open Interest:CME e-o-d vs CFTC e-o-w

CFTC only publishes total OI on fridays, related to last Tuesday.
But what happened since last Tuesday?
CME Vol & Open Interest data is recorded&exported daily by quandl.com to tradingview
via the che CHRIS/CME datasets
www.quandl.com/data/CHRIS

Eg. Nat Gas next outstanding cntract n. 20, field n. 7(OI)
@quandl.com:
www.quandl.com/data/CHRIS/CME_NG20
is exported @UnknownUnicorn305:
www.tradingview.com/e/?symbol=QUA...

Every outstanding contract's OI & vol is exported (black column), but not the total (yellow line):
http://tiny.cc/z7t94y

This script sums up all the existing outstanding contract's OI for the future (the black column), so one can have an idea of the total OI for the day (Yellow line).

As numer of outstanding contracts varies from future to future,Eg:
E-mini (ES) has 4 contracts, Gold(GC) 16 cntrcts, NatGas(NG) has 43, WTI(CL) has 38 etc
the scrips tries to guess how many exist for it and sums them up, to have the total OI for tha day

Number ofoutstanding contracts exported by quandl.com to tradingview is taken from
https://s3.amazonaws.com/quandl-production-static/Ticker+CSV%27s/Futures/continuous.csv


There are 2 params you can enter on the script:
* override the ticket symbol on the chart ,if script cannot guessit or you need a different one
* enter the "preliminary" OI that is published by CME early the next day, butb not yet exported by quandl to tradingview

This script is Open so anyone can copy and modifyit for its use.
Please post comments and ideas if you find it useful
I try to keep a log of my work here:
https://www.tradingview.com/chart/GC1!/tFbdrGlM-giancapino-5-views/
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?