Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This inddicator 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.
- //title the indicator and dont use decimals. (Otherwise when viewing fiat volume you get unreadably large numbers) you can change this in the settings dialog tho if you want.
- //@version=4
- study("Vol in Base asset 20MA", "", true, format.volume, 0, scale.right)
- //Make the moving average user configurable
- showMA = input(true)
- scaleFactor = input(3., "Reduction factor", step = 0.5)
- //Get volume for current bar and multiply with vwap
- vInverse = volume * vwap
- //Track historical high
- var vInverseHi = 0.
- vInverseHi := max(vInverseHi, nz(vInverse, vInverseHi))
- //Plot fiat volume.
- plot(vInverse, color = color.orange, title="VolumeBTC", style=plot.style_columns, transp=0)
- // plot(vInverse, color = color.orange, title="VolumeBTC", style=plot.style_columns, transp=65)
- //Plot 20 candle moving average (changable in settings)
- plot(showMA ? sma(vInverse,20) : na, color = color.white, title="Volume MA", style=plot.style_area, transp=65)
- //Plot historical high
- plot(vInverseHi * scaleFactor, "Historical High", #00000000)
- plotchar(vInverseHi, "vInverseHi", "", location.top)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement