FinNifty Volumes
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © carefulTortois38674

//@version=4
study("Finnifty volume",resolution="",format=format.volume)


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


a= security("NSE:AXISBANK",timeframe.period,volume)
b= security("NSE:BAJAJFINSV",timeframe.period,volume)
c= security("NSE:BAJFINANCE",timeframe.period,volume)
d= security("NSE:CHOLAFIN",timeframe.period,volume)
e= security("NSE:HDFC",timeframe.period,volume)
f= security("NSE:HDFCAMC",timeframe.period,volume)
g= security("NSE:HDFCBANK",timeframe.period,volume)
h= security("NSE:HDFCLIFE",timeframe.period,volume)
i= security("NSE:ICICIBANK",timeframe.period,volume)
j= security("NSE:ICICIGI",timeframe.period,volume)
k= security("NSE:ICICIPRULI",timeframe.period,volume)
l= security("NSE:KOTAKBANK",timeframe.period,volume)
m= security("NSE:MUTHOOTFIN",timeframe.period,volume)
n= security("NSE:PFC",timeframe.period,volume)
o= security("NSE:RECLTD",timeframe.period,volume)
p= security("NSE:SBICARD",timeframe.period,volume)
q= security("NSE:SBILIFE",timeframe.period,volume)
r= security("NSE:SBIN",timeframe.period,volume)
s= security("NSE:SRTRANSFIN",timeframe.period,volume)

Finnifty_volume=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s

Finnifty_average=sma(Finnifty_volume,length=input(defval=10))


plot(Finnifty_volume, color = palette, style=plot.style_columns, title="Finnifty volume")

plot(Finnifty_average,color=color.black,title="moving average")
plot(close)
