TradingView Pine Script Tutorial 13 – Volume and Chart Overlay

TradingView Pine Script Tutorial 13 – Volume and Chart Overlay

YouTube Video

YouTube Video Transcript

[Music] hey this is David for big bits and in this video we’re gonna continue our training view pine script development and we are going to take a look at a couple of different things that we haven’t before and we’re gonna look at an indicator that I’ve published and it isn’t part of the series that we’ve done before it’s actually its own indicator it’s called volume effectiveness and you can actually find it in the Public Library there you go volume effectiveness and what this indicator does and the reason we’re using it is because it works with volume something that doesn’t really chart well with the price in the past we’ve just been working with moving averages so in this video we’re gonna work with volume which doesn’t really overlay well with the price you can see all of its down here it kind of looks good for this particular chart the way we’re using the volume but we’re gonna be working with negative numbers with our particular volume indicator so what we’re doing is we’re actually setting this indicator not to overlay on the main charts but it’s gonna be its own kind of chart here so that’s one of the things we’re doing and of course we’re working with volume now what is this indicator all about and why did I make this particular indicator I made this indicator to help you measure the effect a single unit of volume has on the price now if we zoom in here a bit see there’s a really large candle here this is the actual volume on the candle itself but you can see compared to the next candle the effectiveness of that volume is much higher that’s because the price increased more with less volume than on the next candle I hope that makes sense essentially for every Bitcoin on this particular chart the Bitcoin USD chart for every Bitcoin that was traded with disome ount of volume this is the percentage of price it was able to increase the price on the daily candle from open to close so from our open price here considering all of the volume throughout the day this is where it ended up and the effect of course is that change divided by the volume and why does that matter it just kind of gives you an idea of basically how much the volume is it kind of gives you idea of how stack the order books were just without a glance it may or may not be useful but it is a good example to show you how we’re working with volume and how we’re showing you these particular non overlaid charts and you can see we can actually kind of pick up on the trends by smoothing these averages out so it’s uh it sounds like it may or may not be useful when you’re just describing it but when you look at the chart we’re actually able to plot it out to where it’s actually kind of useful and you can kind of see that it aligns pretty well with the price movement and you can take it and use it as part of whatever suite of indicators you have to try and figure that out for yourself but as part of the tutorial let’s go ahead and get into the actual script here we have all of our other things that we we usually have any other videos first thing you’re gonna notice different really is we have to set the overlay equal to false this would this is what makes it its own little chart here instead of overlaying on top of this particular chart the main chart I’ve also set the precision because although with Bitcoin on coinbase these percentages are just fine at you know four or five but other coins other trading symbols the percentage movement on price per volume will be much much lower so that’s something to keep in mind but since the chart is relative it doesn’t really matter what the scale is over here it could be eight nine ten zeros or more in percentage points but when you’re looking at them comparatively you can still kind of get an idea of what’s going on now we’ve added a few features in here let’s go ahead ahead and take a look at what we’ve done we’ve made it to where we can hide or show the bars now you can just kind of see the trend and we can hide or show the smooth moving average we can also adjust the moving average period the type of moving average and we can also set this to where it’s going to be an absolute effectiveness now that kind of just disregards whether it’s a red candle or a green candle and all of the values are positive this is how much effect the volume had just in general regardless of direction of the price I’m going to turn that off I don’t really care for that too much and we’re gonna hit OK now I’ve already covered how to do inputs and everything like that so if you don’t know how to do that go back to the other videos I did create this section that pretty much does all the logic for us for calculating the effective volume I’ve already told you we are going to use the closed price divided by the open and then we’re going to subtract one from that and then multiply it by 100 to get the percentage change okay so this right here just so you clear this is calculating the percentage change for the day and then we just divide that by the volume for the day it’s really simple on this particular calculation we’re using the absolute value that is what gives us these values it’s the same thing it’s just if the number was negative now it’s positive it’s pretty simple stuff we’ve also already covered this function on how to use different moving averages as an option those are in the previous videos and of course we set the value and then we plot our information on the chart now it’s quite simple as you can see we just have the smooth line and the bars and this is it that’s all there is and to use volume it’s just a property of the chart for this particular candle that you’re on so it’s similar to The Closer the open you just call volume and it knows that you’re talking about the volume for the current candle that it’s processing and that’s all there is to it we have our chart overlaid well not overlaid it’s on its own chart the indicators on its own chart and it’s using volume which is something we haven’t used before and it’s smoothing that out and this is how you can make your own indicator that’s not on the same chart and you can actually plot more and more information on this single overlay as long as you do it all into the same indicator now if you go to do other indicators and they all had their overlay set to false you’ll notice that it’s going to add other charge so for example another one that I’ve done let’s go to public library smooth RSI excellent you can see this one also is not an overlay on the main chart but since it’s not part of the same indicator it’s going to create its own chart and it has all of its information laid on that chart now that pretty much covers it for this particular video if you want to see this indicator that we talked about here or the smooth RSI indicator then please check out my profile on trading view you can see I have that published here it’s got quite a bit of like so we’re starting to get a lot of followers and likes on the account in general there’s all the scripts from the tutorials before so if you like this video please leave a like and if you like all the stuff that we’re doing here and you want to see other examples of things that are being done please subscribe there’s gonna be more videos coming up in the future think in one of the next videos we’re going to be doing a scoring system on the indicators we’re gonna kind of combine multiple indicators and score them and give confidence levels and basically tell you in that particular indicator whether it’s a good time to buy or sell and of course it’s not going to be trading advice it’s just going to be an example but it’s gonna give you an example of how these things are actually done where people take multiple indicators into consideration for a single strategy as well as plotting them on an indicator to give them an idea of how confident they really can be on a single trade so that’s all there is for today thank you and have a good one [Music]