YouTube Video Transcript
[Music] hey i’m david for big bits in this video we’re going to take a look at trading view in pine script the functions for rising and falling if you’re not familiar with these functions what they do is they allow you to quickly just call a single function to tell you if a certain value has been rising or falling over a certain period of time recently there has been a change to how they function i’m going to go over exactly how they differ now and how it actually functions now so that’s something to keep in mind so first of all i have created a script here that we’re gonna go over and explain all this later but if you wanna take a look at my other scripts you can always check out my profile on trading view and also there is a link if you’re looking to go with the paid subscription you can use the referral link in the description of the video you can get thirty dollars towards your purchase on your paid plan and i get thirty dollars as well but today we are going to be focusing here on the rising and falling functions they were modified here recently and one of the things that you should be keeping up with if you’re going to try and keep up with pine script and all the changes is the pi encoder squawk box on telegram now i don’t admittedly get to this as much as i would like to but when i do see something here it’s oftentimes very important now there was a new behavior to how rising and falling worked now you can probably read this for yourself but i’m going to explain it because the wording is perhaps a little bit confusing it says the behavior of rising and falling has changed the functions now return true only when the series has been rising and falling consecutively for the length of number of bars whereas before it was sufficient for the previous length values to be lower or higher than the current value for the function to return true and like i said that can be kind of confusing now what you need to focus on is the word consecutively here because the way this works now is that the value that you’re looking to see if it’s rising has to be rising consecutively or falling consecutively for the length that you you supply if it rises once goes down once and then comes back up it’s not counted as rising if you’re looking back three bars and i’ll show you that example in just a moment so before it you should just check to make sure that the value is greater than all of the values within that time frame before so like i just mentioned the value could have went up and down within that those three bars that we mentioned but as long as the most recent value was greater than all of those it would have counted as rising so that’s a very important clarification that you need to make when you’re working with this now as opposed to in the past honestly i think it’s a little bit more intuitive now it was uh kind of odd how it worked in the past based on their wording here it’s not something i actually used a whole lot because i i used some other methods to do these things and i didn’t really look for consecutive uh rising and falling what i would usually look for were frequency i should say uh like eight out of ten times something happened instead of 10 times in a row but uh anyway on to the script reference manual here you can see they have this now within their script reference manual you can see the example and on to the actual script you can see i have created a script and actually let me remove it and then add it back to the chart that way we know we’re working with the most recent one we have our code down here but what’s important is you are looking at a moving average this is a 20 period simple moving average and we are going to be storing our boolean values for whether or not the rising and falling were true into these is rising and is falling variables we’re going to be checking whether or not the moving average has been moving up or down consecutively three times in a row now we are also going to be changing the color of the line based on whether it’s rising or falling so if we are currently rising three consecutive times in a row on our moving average then we’re going to make the color the line green otherwise the color is going to be red and then we’re going to plot that onto the chart now let’s go down here and take a look you can see we are basing things off of the moving average and the moving average at this point had moved down three times in a row starting here so the moving average actually started moving down somewhere back here about three bars back but since it finally hit three times in a row here that’s when it turned red uh if you wanted it to turn red as soon as it turned down then you would just check to see if it changed one bar back now you can see it dipped here and it started to come back up so three bars after that changed then it turned green so you can see where these things change and where it started rising consecutively and where it had started falling there consecutively now this is really smooth and looks pretty nice with the moving average because moving averages tend to uh show a trend for longer periods of time than just the regular close price so i also wanted to show you this how it looks when you are just using the close price when you’re looking at the rising and falling and you’ll notice things look a lot different and we’re still going to plot this on the moving average value that way it’s easy to see so let’s actually save there we go and you can see uh let me actually make that smaller zoom out just a little bit there’s not a lot of red um i just mean bitcoin’s been doing really well but looking at the chart here you can see there is a little bit of red here and the only reason is because the close price ended lower three times consecutively so started here it was lower lower lower and that’s why the line turned red going into that bar and then of course it happened one more time into this one so it turned red going into that bar the price closed above it so at that point then it is no longer consecutive the closing price is no longer consecutively lower so the line is not red it obviously isn’t consecutive three times up in the closing price here so it just is white our default color now you can see here on this candle and remember when you’re plotting these lines the line turns that color and basically going into the bar that it’s set for so it can be kind of confusing and a lot of times when i do this i like to use circles so maybe that’s a better way to do this but for now it just helps to kind of explain what we’re doing you can see we have the consecutive close here above that one and above that one which is also above that one because that candle is red that closes down there so hopefully you can see kind of the difference on how these things actually work and where you might be able to use this in your code as well but i think that’s going to be it for this particular video there is a really exciting feature well not maybe not even a feature but a product i should say from tradingview that is a desktop client i have just started looking at this i’m going to play around with it just a bit but if you go to the squawk box you can see that it is a beta to me it kind of just looks like a web browser built into a desktop application but hopefully it will provide some resource benefits that where when you’re in chrome or brave like i use that it’s kind of like a memory leak and the memory just keeps the memory usage just keeps going up and up and up and it’s just really inconvenient on your system resources especially if you don’t have a lot of ram i happen to have a decent amount but even then after a while it gets to where it bogs down the system especially when we’re doing other things such as recording videos and uh other sorts of automation on the computer here but like i said that’s gonna be it for this video if you like this video you’re interested in trading viewing pine script please leave a like on the video that helps me a whole lot i appreciate that but if you like the video why not go ahead and subscribe while you’re down there that also helps a lot and you get videos like this when there’s updates on trading view and changes on the code and things like that that are going on hopefully we’ll have quite a few more videos here soon but that’s it for now thanks and i hope you’ll have a great day
YouTube Video Description
< br/> 🔻🔻🔻🔻 IMPORTANT LINKS BELOW 🔻🔻🔻🔻
Using Rising & Falling Functions in TradingView Pine Script – Recently Updated!: In this TradingView Pine Script Tutorial/TradingView Update, we discuss the use of the Rising and Falling functions in TradingView Pine Script. They have been recently updated to require consecutive movement in the appropriate direction. With Pine Script it is very easy for even beginners to create their own indicators or strategies that have many other indicators within them. Once we have completed the script, we can see our results immediately and begin working with more functions, indicators, and strategies.
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/
📈 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 #tradingview #pine #stocks #finance
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!