On Balance Volume Indicator Explained With TradingView – OBV Indicator Explained

On Balance Volume Indicator Explained With TradingView – OBV Indicator Explained

YouTube Video

YouTube Video Transcript

[Applause] [Music] hey this is David for big bits and in this video we’re gonna talk about on balance volume this is part of our series on indicators and explaining how they work and how they are used with tradingview and as I said today we’re going to be talking about on balance volume but if you’re interested in other indicators please take a look at this video series this playlist here on YouTube and check out some of the other videos we go over a lot of different indicators as well not just the on balance volume and other similar indicators we go over quite a few so if you would go ahead and subscribe if you’re interested in that otherwise stay tuned we’re gonna start talking about obv now now if you are not familiar this is what obv looks like let’s zoom in down here it’s a very large value here we’re looking at a Bitcoin chart I believe and you can see the values are pretty jagged moving up and down and they kind of seem to have trends so we’re gonna look and see why these values are the way they are why it’s going up and down how you can trade it some limitations and reasons people use obv now let’s go ahead and switch over to the investopedia article about on balance volume I tend to use their articles just to highlight some of the important information so that you can see it in its visual instead of just talking about it throughout the whole video now of course we’ve already mentioned obv is on balance volume this is a momentum indicator that’s using volume in order to come up with its value and it’s tracking the flow in and outs with the volume on the chart this was first developed in 1963 it seems like a very simple indicator once we start looking at the math so it’s kind of surprising it was only invented in 1963 and not something much older but as we continue on we’ll learn a little bit more about it the reason he created this was because he believed that you can anticipate large moves from the big money like institutional investors because there will be divergences from the price action on the charts and the obv trend so you’ll be able to notice when things sort of come to the stall or begin to break out in a different direction than what you would expect based on the price action now some of the key takeaways they’ve shared that I haven’t already mentioned is that this can show the crowd sentiment whether it’s bullish or bearish kind of looking at whether or not there’s a trend up or down and comparing a relative price action or action between price bars excuse me and obv generates more actionable signals than green or red volume histograms commonly found at the bottom of our hearts okay all that’s saying is that this will help you identify more valuable information based on volume compared to just looking at the volume itself that’s just a long way of saying that and this is the formula for the obv and it is a very simple formula it looks kind of confusing if you’re not too familiar with the way these things are laid out but essentially you’re taking the previous value so when you start out with zero you’re gonna have zero as the previous value then you’re going to add onto that based on the current volume and the closing price currently and the candle before that so if you’re close zoom in here if your closing price on this candle is greater than the one before it you will add the current volume on top of the previous obv value if it didn’t change you don’t change the obv but if the closing price is lower than the previous candles closing price you actually remove the current volume from the previous obv value and so you can just kind of tell by looking this calculation that this is a cumulative value it continues to add on top of the previous value and that’s why those numbers were so large on the indicator on trading people when we looked at it at the very beginning of the video now it goes again goes on to explain that just a little bit more and just tells you that it’s a running total of the volume and it indicates whether the volume is flowing in or out of that security now it does try to go in to tell you that this is a good way to find divergences now obv is not an indicator that I use very often but it is one that I have been requested to add into a lot of indicators I’ve built for other people so there is a lot of value to obv a lot of people do use the indicator for themselves and they use it to try and detect these trends and price changes based on the volume and that’s essentially what this article is telling you is that when the volume diverges from the price action you can usually anticipate a move in that direction that’s why they call it a leading indicator as opposed to a lagging indicator now there are some issues with this and that is that because it is a leading indicator it can produce false signals so your going to anticipate moves but a lot of times they’re going to be incorrect that’s the way it is with any indicator but on this one it’s probably more so true than others now you can reduce these effects by adding lagging indicators and one way that it mentions to do this is to add a moving average on to the obv so you take your obv value you smooth that out with a moving average of some sort and you can look for trend changes based on whether or not the OBD is turning above or below that moving average or even just changes in the direction of the moving average well it also mentions I believe it was earlier in this article that a single candle with a lot of volume and a huge change in price could drastically affect the way this indicator is interpreted going forward and that this value on the indicator let’s go back to the chart you can see that the current value on this one is one point four five six million now that would be different if we put this on the BLX chart because the BLX chart has more history and in fact let’s do that and I can show you why that made such a difference and you can see our total value now is 18 point 175 million and the reason for that is that it is a cumulative value so the more price history or the more candle history you have to work with the more cumulative value you have to look back for so let’s go ahead and change this back to the coin base chart because that’s the one I like to look at mostly and you might not have been able to see the value but you should have been able to see the total down here if you need to go back and double check and make sure that I wasn’t lying to you now that is pretty much it for the article itself and the information regarding obv now what we’d like to do in these videos is we’d like to go on to trading view and actually explain to you the calculation and how that impacts what’s going on this is a pretty simple calculation but not only that I can show you how to actually do this calculation with in trading view and a couple of different ways as to how you can do it using their default template that they give you and the way you would probably do this if you didn’t know what you were doing on trading you so I’m gonna go back over trading view or take a look at our ovv indicator that I’ve added here now what I’ve actually done is I have actually went to the new section over here and you can actually add the obv to Pyne script using this template and it will give you some of the code that we’re going to be working with it’ll give you this code here we’re gonna be working with this code to begin with because this is the way you would probably go about calculating obv and it probably will make a little bit more sense if you were trying to do this and something like Excel or another program so first of all you’ll also notice that if you go to add indicators you can probably just search for obv and there you go it is a built-in indicator so you don’t have to do this but we’d like to discuss the code behind how these indicators work so you can understand the logic and what makes them tick so that you can better interpret what’s going on with the indicator itself now let’s go ahead and zoom in and take a look the first thing we’re going to do is we’re going to create a variable to store the data so this is our OB B value then we are going to carry over our past value so if you remember in the calculation you have to take the previous value and you have to add the current volume or subtract it based on certain logic so we need to know the previous value and we’re going to go ahead and just carry it over from the last one and then we are going to use some logic here and this is basically some if-else statements or if else if statements here the question mark here is a ternary operator and if you’re not familiar with that it’s like the I if statement in Excel and what you’re going to do is you’re going to look for an expression and then you’re going to return this value and then if you do another expression you’ll evaluate that and return that value and otherwise you would return the last value so I’ll walk you through this and explain this a little bit more in depth so what we’re doing first of all is we are going to set the ovv value based on this first condition and that is is our closing price on the current candle greater than the closing price on the previous candle so that means did the closing price move up from one candle to the next and if that is true we are going to add the current volume on to the obv valance excuse me then otherwise if the price didn’t go up it didn’t close up higher than the previous close then what you are going to do is you are going to check to see if the closing price is equal to the current closing price and I’m going to try and get this to move up just a little bit so you can see it there you go so if the current close is the same as the previous candle then you don’t need to do anything we’re just going to set it to its previous value the one that we carried over then what we’re going to do is we are going to finally subtract the volume from the previous value because the only other option left is that our candle or that yes our closing price is lower than the previous candle and I was tempted myself to focus on of the candle but this is actually you focusing on the closing price of the current candle compared to the closing price of the previous candle so if you’re just focusing on green and red candles considering there aren’t gaps on the price charts it will make a difference if you compare the open to the close here so just always make sure you’re comparing the current close to the previous close as opposed to the current close and the current open okay after we’ve done this we can just plot our value and that’s exactly what we’ve already done here on the chart you can see this is our red line and to find that here you can see our red line on here going up and down and that’s pretty much all there is to obv now what I’m going to do is I’m going to use their default code that they have here and we’re gonna plot both of these at the same time and it should overlap with what we have and the value should show up here and show us both the same values on all of the candles okay so let’s zoom back in and we can scroll over a few different values and kind of spot check that they are all the same and if there was even a single mistake in the code the values would be different because this is a cumulative value and they would just continue to separate further or be very very unlikely they would converge back to the same value so for those of you who are interested in Pine script who follow my channel this is some pretty interesting code that we’re looking at so what we’re looking at is the change and this is the exact same calculation it’s just a single value and obv is actually a built-in variable now you don’t even have to calculate it so this is a little bit outdated as far as how this actually works on there but you can you kind of get the picture this is mostly for the calculation and how to use it for pi so we get our source value and that is the closing price we get the change in price from that closing price from the current candle to the previous using the change function that is going to give us a changing value and it could either be positive negative this is the change from the current close to the previous close this is exactly what we were doing in the other calculation and then we are using the sine function and I’m not sure if you can read that when I hover over it it says the sine of X is zero if the X is zero so if there is no change then you use zero and you would multiply that times the volume so if our closing price didn’t change from one candle to the next our OED wouldn’t change because we are adding on to it zero times the volume now if we had a positive value and that you might be having a hard time seeing this right now so let me just see if I can pull up the reference manual so if your sign or if your change was positive it’s going to return one we’re going to multiply the volume times one so it’s going to return a positive value and we’re gonna add that on to the previous value but if it was a negative change it’s gonna return negative one so that’s why they multiply it times the volume so that you can get a negative volume to add on top of what you already had which will just decrease it now the final thing that they do to calculate this is they get the cumulative value which is the total sum of all of these values in the past so that’s just exactly what we’ve done so far and you can see it produced the exact same result so that is going to be it for this video I hope you enjoy the video I’m going to be putting the resource for the article in the description of the video while you’re down there checking that out please go ahead and like the video if you would like it this far I would hope that you would have liked the video here on YouTube but also while you’re down there please subscribe that’ll help me out a whole lot but other than that that’s it and have a great day [Music]

YouTube Video Description

< br/> ๐Ÿ”ป๐Ÿ”ป๐Ÿ”ป๐Ÿ”ป IMPORTANT LINKS BELOW ๐Ÿ”ป๐Ÿ”ป๐Ÿ”ป๐Ÿ”ป

On Balance Volume Indicator Explained With TradingView – OBV Indicator Explained

Explained: The On Balance Volume (OBV) trading indicator is a cumulative value of volume considered on balance based on the flow of the volume into or out of the security. Fortunately, TradingView has the On Balance Volume or OBV indicator available as a built-in indicator on the platform as well as a built-in variable in pine script.

https://www.investopedia.com/terms/o/onbalancevolume.asp

๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ
Social and other public profiles
๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ
๐Ÿ’ป Website: https://www.bigbits.io
๐ŸŽฎ Discord: https://discord.gg/rapMn4z
๐Ÿฆ Twitter: https://twitter.com/BigBitsIO
๐Ÿ“” Facebook: https://www.facebook.com/BigBitsIO/
๐Ÿ‘จโ€๐Ÿ’ปGitHub: https://github.com/BigBitsIO
๐Ÿ“ˆTradingView: https://www.tradingview.com/u/BigBitsIO

๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ
Referral links
๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ๐Ÿ’ฐ
๐Ÿ“ˆ Buy, Sell and Trade Crypto on Binance.US with LOW fees: https://www.binance.us/?ref=35105151
๐Ÿ™‹โ€โ™‚๏ธ Want to buy crypto? Get $10 of bitcoin w/ your first purchase over $100: https://www.coinbase.com/join/johnso_dxz
๐Ÿ“ˆ Sign up for a paid plan at TradingView and receive a $30 credit: https://www.tradingview.com/gopro/?share_your_love=BigBitsIO
๐Ÿ’ป Browse privately and get rewarded with Brave Browser: https://brave.com/big406
๐Ÿ•น Receive bonus perks when purchasing Lightnite Game: https://lightnite.io/ref=BigBits
VIEW ALL HERE: https://bigbits.io/bigbits-referrals/

โ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธ
DISCLAIMER: All my videos are for educational and entertainment purposes only. Nothing in this or any of my videos should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto coins and tokens. Consult with a professional financial advisor before making any financial decisions. Investing in general and particularly with crypto trading especially is risky and has the potential for one to lose most or all of the initial investment. In simple terms, you are responsible for your actions when trading.
โ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธโ—๏ธ

#bitcoin #crypto #cryptocurrencies #tradingview #binance #binanceUS #coinbase

This channel focuses on Bitcoin, Ethereum, LiteCoin, Ripple, Link, Basic Attention Token and almost all cryptocurrencies that demand attention. Please like the video if you liked the video, and subscribe if you like these types of videos. David from BigBits is an experienced Software Engineer, but no one is perfect, If you find any issues with any of the open-source, free code, or code shown in videos please comment to let us know what to fix, we listen to our viewers!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *