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

//@version=5
indicator('IT volume', timeframe='', format=format.volume)


barColorsOnPrevClose = input(title='Color bars based on previous close', defval=false)
palette = barColorsOnPrevClose ? close[1] > close ? color.red : color.green : open > close ? color.red : color.green


a = request.security('NSE:COFORGE', timeframe.period, volume)
b = request.security('NSE:HCLTECH', timeframe.period, volume)
c = request.security('NSE:INFY', timeframe.period, volume)
d = request.security('NSE:LTI', timeframe.period, volume)
e = request.security('NSE:LTTS', timeframe.period, volume)
f = request.security('NSE:MPHASIS', timeframe.period, volume)
g = request.security('NSE:PERSISTENT', timeframe.period, volume)
h = request.security('NSE:TCS', timeframe.period, volume)
i = request.security('NSE:TECHM', timeframe.period, volume)
j = request.security('NSE:WIPRO', timeframe.period, volume)

IT_volume = a + b + c + d + e + f + g + h + i + j

IT_average = ta.sma(IT_volume, length=input(defval=10))


plot(IT_volume, color=palette, style=plot.style_columns, title='IT volume')

plot(IT_average, color=color.new(color.black, 0), title='moving average')
plot(close)

