TradingView
silenThunderr
24 авг 2020 г., 16:15

NSE (CNX) FUTURES Cumulative Open Interest Volume 

S&P CNX NIFTY INDEX FUTURESNSE

Описание

This indicator combines Volumes of all the open contracts of
NSE FUTURES (e.g. NIFTY FUTURES) and Combines them together.


For e.g. Default Ticker is set to NIFTY1!

NIFTY1! + NIFTY2! + NIFTY3!

Since NIFTY3! is not available on Trading View one has to manually add (via indicator settings) the last (third) running month's Futures contract symbol (NSE stock future symbol) in this.

Информация о релизе

added title "COI Vol"

Информация о релизе

Corrected the Volume addition
Комментарии
sufiyan99
Hi can you share the script for my understanding
silenThunderr
@sufiyan99,

// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/
// © silenThunderr

//@version=4
study("NSE Futures Cumulative Open Interest Volume" , shorttitle="COI" , format=format.volume)

vol2_ticker = input(type=input.symbol, defval="NSE:NIFTY2!")
vol3_ticker = input(type=input.symbol, defval="NSE:NIFTYV2020")

vol1 = security(syminfo.tickerid, timeframe.period, volume, lookahead=barmerge.lookahead_on)
vol2 = security(vol2_ticker, timeframe.period, volume, lookahead=barmerge.lookahead_on)
vol3 = security(vol3_ticker, timeframe.period, volume, lookahead=barmerge.lookahead_on)

daily_vol=vol1+vol2+nz(vol3)

barColorsOnPrevClose = input(title="Color bars based on previous close", type=input.bool, defval=false)

palette = barColorsOnPrevClose ? close[1] > close ? color.red : color.green : open > close ? color.red : color.green

plot(daily_vol, color = palette, style=plot.style_histogram, title="COI Volume", linewidth=4)
plot(vol1, color=color.white , style=plot.style_line, title="Current Volume", linewidth=2)
pramod1990
@silenThunderr, how to get life time cumulative open interest and also how to apply for other scripts or stock specific
silenThunderr
@pramod1990, bro u can just add the ticker future contact months in settings of what ever future stock u are viewing
silenThunderr
@silenThunderr, currently that's not possible with TV it only give first and second month future contract for Third Month we have to manually add it unfortunately.
Spector555
Thank you!
Ranjan121
I am getting the following error. I have added volume 3 with NIFTYV2022 "Add to Chart operation failed, reason: line 5: Could not find function or function reference 'study' "
silenThunderr
@Ranjan121, For e.g. Default Ticker is set to NIFTY1!

NIFTY1! + NIFTY2! + NIFTY3!

Since NIFTY3! is not available on Trading View one has to manually add (via indicator settings) the last (third) running month's Futures contract symbol (NSE stock future symbol) in this.

Understand and use properly.
Ещё