Color Inputs Now on TradingView! Also a New Path Tool!

Color Inputs Now on TradingView! Also a New Path Tool!

YouTube Video

YouTube Video Transcript

[Applause] [Music] hey this is david for big bits and in this video we’re going to take a look at a couple of important updates to trading view one is just another drawing tool that’s kind of helpful and the other is yet another feature added to pine to help us with our development of our scripts and more customization it’s going to be really nice to have this feature finally it’s something we’ve been able to do but we’ve had to use workarounds to accomplish but essentially go ahead and get straight to the point you can see you have color inputs now in pine this means you can have a setting that will save the color value that you want to use in your script and this is good because now you don’t have to use like a drop down list and have people choose a text value or like a number value of the color and then you have to do some sort of conversion or a function in your script now you can just save the actual color data type in a variable and you can use it in your script i’ll show you how we do that in just a minute but then they also added this cool new drawing tool this is what they call the path tool it’s got a nice little gif here showing you kind of how it works it’s just allowing you to create a series of lines in a row and it’s got some settings down here to where you can kind of change the ends of it as well as some of the other line features that you’re used to but let’s go ahead and take a look at the chart on what we have here this is the bitcoin chart on one minute and what i’ve done is i’ve plotted a 200 period moving average on the chart and let’s zoom in here just a little bit so we can see some choppy price action here because i wanted to show you how the script works you notice that when the price is above the moving average the moving average is green when the price is below the moving average is red and we’ve done this using our color inputs but what’s really cool is instead of having these hard-coded in your script or using some complicated drop down with limited colors you can actually have this now as a setting so let’s change this to yellow but actually we can also allow it to set the transparency hit ok and now you have a yellow line there and since this is saved as part of the indicator it’s going to show up every time as yellow for them until they change it or remove it and re-add it now that’s really cool but let’s take a look at the code really quick because on this channel we like to discuss the actual code itself so let’s scroll down here zoomed in now you can see what we’re doing excuse me what we’re doing is we’re actually saving this input as a variable which is a color data type now a data type is just exactly what it sounds like it’s a type of data that you can use that means that this variable instead of it being an integer or a decimal value or a string of text this is actually a color and it’s going to store that hexadecimal value i believe which is what you see up here as part of it so when you’re down here what you’re doing is you’re just saving that input as a color data type variable then we calculated our moving average then we plotted the moving average and we use something that we’ve done before where we’ve either replaced the color conditionally so we do our condition to check to see whether the price is above the moving average or not if it is now we can just use the color above input which is green by default and you have to make sure that your type on your input is set to input.color that’s new in the namespace as well and if it’s not the price is not above the moving average then you use your color below and since you can change these as a user in your settings you don’t have to create some function within the code now to interpret what the user would want or well also you don’t have to hard code these anymore which is really nice and really convenient and it i made a point of adding to the discussion on twitter and i’ve mentioned this before in my videos is that i would really like to see something that i call input groups and uh conditional inputs so what i mean by input groups is we have two here what i would like to see is a collapsible area on the input section to where by default if you wanted to you could have this minimize and not show these values that way you could save some screen space because on a lot of our other ones we have tons of variables in there so that’s going to be really nice if they ever get that in there and also conditional variables that oh conditional inputs i should say that will use their default value unless um you have a certain condition met to have it shown and allow the user to customize it as well so that’s getting pretty complicated and could cause some confusion for a lot of people with the conditional stuff but i believe the input groups are a really nice addition that we can hopefully look forward to in the future now that is it pretty much for this one i just wanted to give you a pretty simple example on how that could actually work and how you change the colors and you can always of course reset your settings and now we have our green and red again now the other tool was the path tool and i need to find it for the first time i haven’t even gotten on here to find the path tool here we go it was next to the brush here so if you’re having trouble finding it as well go to the brush but let’s test this out i haven’t even played with this before this is the first time i’m doing this with the video so we can see the price go down go up went down up down up down up so we’ll leave it like that and i probably should have read how to actually end the line to select the starting point and then mark out the next point so just to exit the drawing mode you just need to double click the end point so there you go even i learned something on this video so let’s let’s do our path again let’s be a little bit more uh generic here there we go okay so i double clicked it that took us out of the drawing mode you can see there are some settings for this particular drawing you can choose line width style and something that’s a little bit different are the ends and you can see on the right end it has an arrow if we wanted to we could remove the arrow you should have seen that the arrow here changed of course you can also add an arrow on the left hand side as well so you can see it’s now got an arrow over there so that’s pretty cool couple of nice new additions to pine and trading view drawing tools something that i think is pretty useful the path is pretty nice but i really like the color inputs and i like a lot of the changes they’ve been making lately they’ve been doing a lot of work on pine and it’s really impressive stuff but that is it for this particular video but uh there is one more thing actually they did add a couple of things to the scripts so now when you’re on your profile you can actually look at commented and liked scripts as well which is pretty nice if you’re wanting to go back and see which scripts you’ve commented on and which scripts you’ve liked as well and i believe you also can get notifications now on the scripts that you’ve liked when there are changes made to them so you can like somebody else’s script and get a notification when they publish an update which is really handy but yeah that’s it for this video if you would go ahead and check out the profile on trading view give it a like and follow also um if you haven’t already please consider if you’re considering the premium plan on trading view to use the referral in the description of the video it’s going to help me out a whole lot and i think you get something out of it as well i think you even get 30 towards yours or 30 worth of credits towards your own account or something like that i don’t really remember right now but if you would use the referral that’d be great uh other than that that’s it for the video you can always check out the tutorial scripts and all the other videos we do where we do a lot of pine script and trading related videos and crypto related videos as well but if you like the video please leave a like on the video and while you’re down there if you like the video please subscribe to the channel and you’ll get updates on when we have new videos and updates from trading view and crypto and other things but that’s it guys have a great day you

YouTube Video Description

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

Color Inputs Now on TradingView! Also a New Path Tool!: In this TradingView Pine Script Tutorial/TradingView Update, we discuss the new feature of color inputs for pine scripts for our indicators and strategies in TradingView. We also get to talk about and show off the new path tool. 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:
๐ŸŽฎ Discord:
๐Ÿฆ Twitter:
๐Ÿ“” Facebook:

Referral links
๐Ÿ“ˆ Buy, Sell and Trade Crypto on Binance.US with LOW fees:
๐Ÿ™‹โ€โ™‚๏ธ Want to buy crypto? Get $10 of bitcoin w/ your first purchase over $100:
๐Ÿ“ˆ Sign up for a paid plan at TradingView and receive a $30 credit:
๐Ÿ’ป Browse privately and get rewarded with Brave Browser:
๐Ÿ•น Receive bonus perks when purchasing Lightnite Game:

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!