HMA – Hull Moving Average – Indicator Explained With TradingView

HMA – Hull Moving Average – Indicator Explained With TradingView

YouTube Video

YouTube Video Transcript

hey this is David for big bits and in this video we’re gonna take a look at the whole moving average now this is personally one of my favorite moving averages and I’ll explain to you why in just a moment but for those of you who aren’t familiar with these videos we’d like to discuss the math behind the actual indicator so you can have a deeper understanding as opposed to just how to trade it so first we’re gonna take a look at actually how to trade it and then we’ll take a look at the math as well behind the indicator so that you can understand how this actually works now this is a whole moving average in green this green line this is a 30 period whole moving average now the whole moving average is a very fast moving average and by that I mean that it eliminates a lot of the lag and moving averages and by that width and when I say lag I mean that when you’re calculating a moving average a lot of times the moving average line is well under or it doesn’t seem to correlate very well with the most recent trends in the price so let’s for example add a simple moving average to the chart and I can give you a little bit better idea here and a moving average let’s give it the same look back period of 30 okay so you see the simple moving average the blue line it doesn’t tend to stay close to the price and that’s what we mean by lag the whole moving average tends to stay closer to the current price which means it has a little bit less lag in the indicator it can pick up the movements and the change in price quicker than a simple moving average and that’s what makes it one of my favorite indicators to actually work with on just about any indicator that I use so let’s go ahead and remove the simple moving average and let’s go ahead and show you kind of how you can trade this now this is using some documentation from the fidelity website just so that you can get some visuals here now this pretty much tells you exactly what I’ve told you this moving average was actually developed by Alan hull but the most important thing you can see is the comparison to the other moving averages and now these are other ones that are actually pretty quick such as the weighted moving average and the exponential moving average which were designed to be even quicker than the simple moving average but the whole moving average has even less lag than those and it’s a nice smooth line as well so this is one of the many reasons why it’s my favorite indicator now how can you actually trade this particular indicator now if you are using longer period look backs on your indicator for the whole moving average so for example in this one there is a 200 period whole moving average and just to give you an idea of what that’s gonna look like let’s actually do this on this particular chart so this is a 200 period whole moving average now in this case what they’re saying is that the trend is moving up so it might be better for you to enter into long positions while the trend is moving up now while the trend is moving down you would want to look for short positions or to exit your Long’s now you can see that here this period of movement is up so you should have looked for Long’s here and if you were using certain indicators to pair this with you might have found some very good entries on some Long’s during that trend and then when it broke through then of course right here the line is actually pretty neutral so you might not want to look for shorts excuse me during a neutral movement like this but for example when the line was moving down pretty steadily here you might have been looking for a short here or during these periods as well so it’s actually pretty good to use to help you look for what side of a trade you should take on these longer time frames at least with the reference to the period that you’re using so that’s using a longer period hole moving average now let’s actually look at what else they say and this is the shorter period whole living average now instead of just looking at the chart and saying you know we are in an uptrend we should look to buy throughout this uptrend what the shorter period whole moving average does is tell you a better area of when to actually enter in a position now I don’t typically like to use moving averages to enter into a position at least not based entirely on the price but for the example with the whole moving average let’s set this down to a shorter hole moving average let’s just say 10 and during that period of that uptrend where we were looking at earlier you would have according to this article use the changes in the direction of the moving average to determine when you were going to enter so when the direction changed here you would have entered and you probably would enter the position here on this particular hole moving average now you would have also have been looking at these other changes here as other potential entries as well so that’s why I think in my strategies that’s why I like to use other indicators to pair it with as well because you can kind of tune out some of this noise or you can also adjust your moving average period to something a little bit longer let’s say 25 so now it’s not quite as bad you can see if you were to get in on these it’s similar but you might be a little bit later in getting in your entries because of that so I’m definitely not telling you that you should use the whole moving average I’m just telling this is one of my favorite ones just because of the reasons I’ve shown you and this because of the fact that it reduces the lag and you can pick up these changes in in momentum and on the longer periods it’s such a nice smooth line and it’s so quick that it picks up on these trend changes quicker than other indicators so that you can look for those actual trend changes when they actually occur so that pretty much does it for how they have set up for you to potentially trade the whole moving average now what about how the whole moving average is actually calculated well this is actually a somewhat complicated calculation and it is all based off of a weighted moving average now if you don’t know what a weighted moving average is please go back and look at one of my other videos in this series where we talk specifically about a weighted moving average but what you really need to know about the weighted moving average is that the most recent candles are weighted much more than the last candles in the look-back period so each candle is weighted individually and the ones that are new our waited much more than those in the back and that’s pretty much all you need to know about a weighted moving average without having to go back and look at that video so there are three parts to this actual calculation now let’s bring up the actual code and I will show you in just a moment here you can see I have three parts here but I want to explain this to you using the web site as well here so using their method of showing you this you can see that first you calculate a weighted moving average with a period of n divided by 2 multiplied by 2 it’s hard to do this when you’re just reading this line here you might want to look down here as well so let’s actually highlight these as we go along so number 1 calculate a weighted moving average with a period of n divided by 2 and multiply it by 2 so let’s set this one to green and we’re going to add that in here so it’s the first part of our calculation now a second part of our calculation is to calculate a weighted moving average for for period in and you subtract it from step one so let’s highlight this one orange now this is the weighted moving average just based on the moving average period you supplied for your whole moving average so you can see we have part 1 – Part two now the third part is you actually create a weighted moving average based on the difference of 1 & 2 here using the square root of the period that you’re using as the actual period for this weighted moving averages so if your whole moving average period was 9 then your weighted moving average period for parts 1 & 2 well for the difference of parts 1 & 2 would be 3 so we’re gonna do this we’re gonna take our weighted moving average of the difference of those and we’re going to make this one red so that you can understand this is the final step so there you can see all three parts of our calculation here and how they actually work and why this is actually a pretty complicated calculation and it can be a little tricky if you try to code this in your own applications when you’re using square roots because with smaller numbers you’re gonna be working with decimal places and you’re gonna have to figure out how to round those if you’re doing your code and these other languages but with tradingview we can just round these values and I’ll show you that just a moment so you can see with our code here we’re actually plotting this calculation based off of the method that we have seen here we’re using the three-part method so part one we did two times the weighted moving average of the closing price with the period divided by two second part we took the weighted moving average of just the period and then part three we subtracted part two from part one and then we took the weighted moving average of that difference using the square root of the actual period and we of course rounded that just to make sure that there weren’t any issues with it trying to come up with the calculation so this is where the moving average is now I wanted to show you that this is actually calculating exactly what it should and to show you this there is actually a built in calculation here but I also wanted to show you how we combine this into one line so you can see on the calculation page here we put all this together on one line you can also do this in trading view so you just have to pretty much take your code and use your mathematic expressions with your PEMDAS and place everything in the right mathematical order and of course you can do this so let’s actually plot these now we’ve all got them in one and it should be the same line just a different color wait I lied because I was using a different period I can’t remember what we were using was it 200 regardless let’s just go back to 30 okay so we can see 30 here as the weighted moving average and let’s actually go back and do part 1 2 & 3 again and plot that one as well okay so you can see there’s no different line here that means that they’re both plotting on the same one and let’s just hide the MA part again the one with the calculation all in one line so yes you can see that they are all on one line now the great thing about tradingview is they have recently introduced a built-in function for the whole moving average so even if you wanted to do all the math for it you don’t have to you can use just H MA and your pine script code and it will calculate the whole moving average for you without you having to type out this long line of code which could be pretty confusing to look at so all you have to do it’s just plot that after you’ve calculated and we should get the same line as we do here there we go that pretty much does it for how we’re going to use the whole moving average and how we can add it into our indicators on tradingview now any other other questions about using pine script and creating indicators on trading me please check out my other video series which is specifically trading view tutorials for pine script so that you can learn how to create your own indicator so it starts off at a very beginner level so it should be good for everyone getting started and if you’re more advanced than a beginner you can skip ahead some in the series and there’s some really great resources there but we are done with this video I would appreciate it if you could like the video if you actually did like the video and while you’re down there please go ahead and subscribe because we are going to be doing more of these indicator explained videos and like I said we also have the tradingview pine script tutorials so that is it for today thank you and have a nice day [Music]

YouTube Video Description

< br/> ???? IMPORTANT LINKS BELOW ????

Explained: The HMA or Hull Moving Average Indicator is a moving average with considerably low lag compared to other Moving Averages. Created by Allen Hull, the HMA Indicator is calculated using a series of WMA calculations. Fortunately, TradingView has recently added a built-in Hull Moving Average function into Pine (hma()).

https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/hull-moving-average

??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️
Social and other public profiles
??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️
? Website: https://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!