 with another video, and this time it's going to be about Thinkorswim. So let's go ahead and dive into, as promised in a previous video at some point, ThinkScript. In this case, we're actually going to look at the code itself, which is ThinkScript is what it's called. It's really cool because you can actually subscribe to the TD Ameritrade or Thinkorswim, use ThinkScript newsletters or something like that, and it sends you emails on what different scripts different users are using in those days or in these days. So let's go ahead and get started with creating a script. And this is the actual ThinkScript tab. So in this thing, this is the ThinkScript tab. This is where you can write and edit and view the different scripts that you are interested in. Now, as you can see here, I have some, I wanted to go ahead and look at some of these that I have been writing for myself. And before I dive into the coding, which is probably going to be a little off-putting to many, but I hope to work through some of the simplest examples first. Let me tell you what we want to get to. Let's look at the prize first. So this is what it's going to be about. This is what really got me excited about this. Over here in the charts, yes, in the charts tab. As you can see, I have a chart, right, the volume down here. It's got the extended hours session as well. I don't have the volume profile turned on, but that's fine. This is because I created a strategy. And what the strategy does, it's basically you creating your own algorithm. And all this hype about AI, well, basically, you're creating your own AI tool. And you expect that AI tool to perform, to give you money, or at least to make you more money than it loses for. Because no tool is infallible. The point is, the strategy is worth it. If it'll make you more money, then you will lose. And so how does this tie into ThinkScript? Well, basically, you can create your own strategy. And it'll give you an entry point, an exit point, right? So you can see, for example, here, the strategy is telling me to enter the stock here. I enter, I buy 100 shares, it rides up, and then it tells me, okay, you got to sell here. And then it tells me again to enter here, and it rides up, and it tells me to sell here, okay? So buy, sell, buy, sell, right? And at some point, this strategy might actually fail, all right? And that is when we want to tweak. So how would I use ThinkScript before? Again, before getting into the code, how would I use ThinkScript to create a strategy? You know, how is it telling me, how is this one here telling me when to enter, when to exit, right? So it's basically a comparison of these moving averages right here. And the minute that this moving average crosses, you know, the slow one, let's say crosses over the fast one, right? Or sorry, the fast one crosses back over the slow one, then it becomes a buy signal. And when it reaches, you know, a certain point where it crosses back under, then it becomes a sell signal, right? That's basically it. There's no other magic behind that. All right? And what else do I have on the same chart? We'll have the RSI, right? So that makes sense. Now, they don't necessarily line up because my strategy up here is not the RSI. This one told me to buy here. The RSI is actually at this point, eventually getting closer to the overbought area. So it's not exactly telling me to buy here. But it is kind of sort of telling me that it is too high over here, right? So it does combine the strategy signal with the RSI signal. And of course, you can add whatever other indicators you already have, like the MACD as well, as well. And then this one, see how the MACD, again, it didn't line up exactly. Above zero line crosses doesn't happen until here, which is a few what hours later after my x-rays educational strategy, you know, algorithm signaled to buy. Okay? And, and that's basically how you can complement, you know, your strategy with some other indicators. And what was, you know, just mind going to me, it was amazing. You can actually back test this. And it'll tell you how much money you would have made by using the strategy, right? If you would have bought here, you know, and it tells you this is your profit and loss right here. And basically, it's telling you that you've been green for the past, what, seven, eight days, all right. So how do you learn to do all these things? Well, that's what ThinkScript is about. Alright, I have a different script right here. And, and this is another one that I'm working on, I have quite a few. So we're going to learn how to make this strategy, we're going to learn how to make these indicators down here, we're going to learn how to make these, these labels, dynamic labels with data that actually help you, you know, would give you important data points that might be relevant at a particular moment. And that is what we're going to be looking at. So let's switch over to the tools to the ThinkScript editor. Okay, so what we know what we want to be able to achieve, we want to be able to code our own studies, you know, like an RSI but modified, we want to be able to code something like MACD, you know, have you ever felt that, you know, the MACD is really good, but it could use a little tweak right here, or you know, I really like the RSI, but I combined with Bollinger Bands or something like that or two one two standard deviation channels or something like that, you know, whatever, if you want to be able to code it yourself, ThinkScript is actually, I mean, you definitely do it in any other programming like full blown programming language. But ThinkScript, of course, you have to have a ThinkScript platform is designed with that in mind. So it makes it a lot simpler, a lot simpler than it otherwise would be if you had to code it with something like Python or whatever. Okay, so let's go ahead. And also I wanted to mention, let me see here, yeah, we'll start with the simplest possible. I wanted to mention that TradingView, of course, also allows you to do this kind of stuff. I'm not very experienced in TradingView coding itself. I know that JTW, which is an amazing Xtrades contributor, he hosts the Tuesdays and Thursdays, online, whatever they're called nowadays, I don't know, you know, the online streaming pre market sessions. He knows a lot. He created his own indicator. He actually has it on sale on the Xtrades website. You can get it from him. It's called the Neptune Trading System NTS. And you can get it for the website. And so he's got a lot more experience. Well, he's got experience period on TradingView, whereas I don't. So I guess we compliment each other quite well here, because I'm focusing on on Think or Swim. Okay, this one is really simple. This is basic, like you see a lot of stuff here, but this is all grayed out. So that means it's all comments, not actual working code. I mean, it's written in there, but it's how it has this, the pound sign in front of it. That means that that whole line has been commented. So what is ThinkScript? Let's get the basic idea, the simplest thing that we could do on ThinkScript. Okay, so this is an indicator. All right. And this is basically a static indicator. So what are we doing here? Like I said, forget about this commented area up above. The 50 day average, the 50 day average volume for Tesla is something like this. Okay, the words that are in white are the keywords, which means that you cannot use them. So input, for example, is a keyword def, which stands for define is keyword, the average type dot simple is obviously, well, it's a complex keyword, it's probably some sort of an array or something like a tuple. And then the volume as well, because volume is something that you would just as you know, the clothes or the high or the low or the volume, okay, those are all keywords, you can't use those as well. The white ones are defining something, you know, in this case, it's saying that whatever you're going to define next, which in this case, we call it symbol, that name we can pick, and it won't make a difference, is of input type, okay, which means that you can change its value. Okay, and then define is when you're creating, you know, you're creating something that is not going to be editable, you know, by the user. So in this case, we're basically, what we're saying is, okay, we want to create a symbol, okay, and we're going to call it symbol, and we're going to be able to, we're going to call it Tesla, in this case, or TSLA, okay. And we will see why this is not very useful later, but okay, on the second line, because there's only a three four line code, bit of code on the second line, we're going to create something, we're going to define it as AVG volume, okay, and what this is going to be, obviously, average volume, what this AVG volume is defined as is, it is defined as the moving average, which is a proprietary function of thinkorscript, right, so you can't change it, but it knows what it's doing, so it goes and it gets the moving average, right, and what type of average, in this case, we define it as a simple average, right, and we have, there's a comma, which separates this first argument, so to speak, if you've used Excel, you know, you know, when you're defining a function, basically you got to give it all its arguments. The first argument of the moving average function is you got to tell it what kind of moving average it's going to be, in this case it's going to be a simple, its not going to be different, you know, exponential moving averages or whatever, it's going to be a simple moving average, okay, and then the second parameter is volume, okay, what is it going to be taking a simple moving average of, it's going to be taking a simple moving average of volume, okay, and it knows—and that's why it's a green highlighted key word—it knows what volume is, it knows that you're talking about the actual volume of a particular ticker, okay, and what is the period over which it's going to be taking that volume, That means that this is going to return the 50-day moving simple average of the volume. And that is what our AVG volume variable, which we are defining right now, is going to be. And then we're going to define the actual Tesla volume. So what are we doing here? Well, we're getting the symbol, which is the symbol that we defined. And when you mouse over, you can see that it highlights every other place on your code where, well, it's visible on screen, where that variable is being used, the same as it did with the average volume. So it's going to get the Tesla symbol, so it's going to say if, and it goes in, it carries out this function, which is the get symbol. The get symbol function says that you have to tell it what symbol you want to get. Well, in this case, we're trying to get the Tesla one. Okay, we could have just as easily, and this is why I said this is, you know, kind of, you know, it makes no sense. We could have easily just typed in Tesla here in quotations, and it would have worked just as well. Okay, so if we get the symbol Tesla, then the volume, right? Or else, nothing, right? So we're going to get the volume for it, and that's going to give us the Tesla volume. All right, and then we're going to add a label. It's going to have, yes, it's visible, it's showing, I believe this is showing, if you don't, if you're not sure what something is, you can come over here to the inspector, and you can look for, you know, something, sorry, not the inspector, it's the reference, and you can look for something. So the add label would be somewhere in there. See if I can, right, you can get info on it. And that's not very useful as it's all the way down there. Okay, so it's telling us that the first one is if it's visible, if the label that we're creating with the add label function is visible, and it's a Boolean type parameter because it's going to be yes or no, or true or false, whatever. And then the text that you want to be displayed on this label, obviously any kind of text, and then the custom color, which is going to be a type color. Okay, so in this case, what we're saying is we want to display this label that we're adding, yes, because sometimes you don't want to add it immediately. Sometimes you want the label to pop up if something triggers it. So in this case, yes, I want to display the label immediately, and I want that label to be 50-day moving average volume, or sorry, 50-day average volume, and then we're going to append to that static text label, average volume as text, right? So we're having to convert whatever this is as text. And then we're going to go ahead and display this volume. So what does that look like? It looks like this. In this case, it's NVIDIA. It's 101,679. Let's go ahead and type in Tesla, and there it is, 2,740,949. So it's giving us the average daily, 50-day, let me say that again, it's giving us the 50-day moving average volume value of 2,740,949. Now, if you were to go back and get the daily volume for Tesla, then that is exactly, and then calculate its 50-day moving average, then that is the value that you should get, right? 2,7 million. And what is this useful for? Well, what I was trying to do with this is actually something like down here. I wanted to go ahead and compare the daily volume to the average 50-day volume to today's volume, to a particular day's volume. As you can see here, the volume here is low. It's a little bit larger here, and it's growing, and it's growing, and it's growing quite a bit. This is a lot bigger than it was back here. So basically, I wanted to get an idea of, well, this might look big within 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 days. But what does it look like over the past 50 days? And how does that compare to what it is today? So this is an unfinished script, and that's why it's got all this mess here. But I basically wanted to give you an idea of how simple it is that in five lines, 1, 2, 3, we haven't finished it, so we haven't gotten this one yet. Four lines, we basically are able to get the 50-day moving average of a ticker, and just basically throw it up on your chart so you can see. And you could imagine how that would be incredibly useful because then all you would have to do is get to today's volume and then divide it by the 50-day moving average volume, and then you would have an idea of just how active today's volume is compared to the past 50 days, right? And if it's quite a bit above, then you know that something is going on during that day. If it's below, then you know that it's probably a very slow and not very liquid day, etc. So that is basically the entry to think or script, to think script, and why we want to do how easy it is to do certain things that we want to do. Okay, so this has gotten to be a very long video. So I'm going to go ahead and leave these other scripts for later, okay? So what we're looking at right now, what we've seen so far is how to make a script that creates something as simple as a label, all right? We also are going to dive into how to create a script that gives us data that shows up on something like scan, okay? That shows up as a column script, okay? Like as you can see here, Arval, okay? Arval is not your typical mark, mark percentage, last, net, change, bit, ask high, low. It is something that you wanted to calculate. And this column was added by creating a script. So we're going to look at that. We're going to look at how to create a strategy, which is the strategy over here, just it's basically something that goes on a chart, right? And we're also going to look at the study range, right? The study range is another one that doesn't go on the price action. It just goes as a separate indicator down below, okay? Kind of like the VFI to newsletter, which is the one, the volume flow index that we were looking at, which is what basically we got this whole ball rolling. And then this floating panel here is part of the strategy one. I'll show you how to do that as well, which is really cool. So I hope you enjoyed this video, and I will try to put this all together and make the next probably two videos a little bit more in-depth by getting a closer look at these. Where are they? The other three scripts that we want to look over. And these are going to be a little bit longer. So I kind of want to take my time on those, but I thought it would be a great idea to get started with just four or five lines, show you how easy it is to get data from something like ThinkScript. All right, so I hope you enjoyed this video. And give me a like on the video on YouTube. And if you have any questions, maybe a little bit further in the topics that you want to look at regarding ThinkScript or Thinkorswim in general, then go ahead and leave them in the comments down below, the YouTube video. And also, don't forget that if you use the link down in my description down here of this video to sign up for an XTrades membership, if you use my link, I will give you a video tour of the entire XTrades community. So that includes the Discord community and how to take the alerts and how to navigate the different channels. It includes the mobile app. It includes the desktop or website app as well. And I'll give you some of my most sought after videos on trading in general, trading basics, risk management, and all the different topics that I cover here on the XTrades community. So I hope to see you in the next video. And I hope to see your comments down below. And don't forget to get your membership plan today at XTrades using my link down below. Have a great one.