Advertisement
PineCoders

Volume Columns

Feb 21st, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. //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.
  2. //I find this most useful when shopping for alts to quickly get an idea of their liquidity.
  3.  
  4. //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.
  5. //@version=4
  6. study("Vol in Base asset 20MA", "", true, format.volume, 0, scale.right)
  7.  
  8. //Make the moving average user configurable
  9. showMA = input(true)
  10. scaleFactor = input(3., "Reduction factor", step = 0.5)
  11.  
  12. //Get volume for current bar and multiply with vwap
  13. vInverse = volume * vwap
  14.  
  15. //Track historical high
  16. var vInverseHi = 0.
  17. vInverseHi := max(vInverseHi, nz(vInverse, vInverseHi))
  18.  
  19. //Plot fiat volume.
  20. plot(vInverse, color = color.orange, title="VolumeBTC", style=plot.style_columns, transp=0)
  21. // plot(vInverse, color = color.orange, title="VolumeBTC", style=plot.style_columns, transp=65)
  22.  
  23. //Plot 20 candle moving average (changable in settings)
  24. plot(showMA ? sma(vInverse,20) : na, color = color.white, title="Volume MA", style=plot.style_area, transp=65)
  25.  
  26. //Plot historical high
  27. plot(vInverseHi * scaleFactor, "Historical High", #00000000)
  28. plotchar(vInverseHi, "vInverseHi", "", location.top)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement