Volume Chart
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © veryfid

//@version=5
indicator("Volume Chart")
showbars = input.bool(false, "Show as bars?")
vol = volume
plotbar(volume, volume[1], volume, volume, title='Title', color = showbars and volume > volume[1] ? color.teal : showbars and volume < volume[1] ? color.red : na)
plotcandle(volume[1], volume, volume, volume, title='Title', color = showbars ? color.new(color.black,100) : volume > volume[1] ? color.teal : color.red, bordercolor = color.new(color.black,100), wickcolor = (color.new(color.black,100)) ) 
