Hey ,
Here is an example of pinning the volume chart to current chart bottom. You can use this method to pin any kind of chart.
It uses scaling based on the current chart area and highest value in last few bars.
Code: Select all
//This indicator will show volume inversely. So if you are looking at an Altcoin, it will show volume in BTC, if you are looking at for example BTC/USD it will show volume in USD and so on. Works with all altcoins and fiat pairs.
//I find this most useful when shopping for alts to quickly get an idea of their liquidity.
// This shows an example of how to place values at the bottom of the main chart and scale with chart
//@version=5
indicator("FRM Volume Scale v1.0", "Scaler", true, format = format.volume, scale = scale.none)
// Inputs
scalePercentage = input.int(30, "Vertical %", step = 10, maxval = 100)
lookBack = input.int(100, "Last Bars to Look", minval = 2, step = 20)
scaleFactor = 100 / scalePercentage
plot(volume, color = color.orange, title="Volume", style=plot.style_columns, transp=0)
limit = ta.highest(volume, lookBack)
plot(limit * scaleFactor, "High", #00000000)