 Hey everybody, this is Brian and we're talking about Magic8Ball and this specific video we're going to talk about how to add a thinkorswim script. I'm assuming you already know what Magic8Ball is. If not, it's a stock market prediction engine that I've designed. It's currently up and testing right now. I literally just moved it to the cloud this morning, so I'm kind of watching the cloud server eagerly to make sure it doesn't crash, but what are we talking about here? So when we scroll down, Magic8Ball makes these predictions and you get these beautiful charts. And as beautiful as these are, sometimes you want to see this in thinkorswim. Now don't get too excited. The line's not going to automatically move. I'm going to tell you that up front and I'll tell you why later. But instead of manually drawing these lines like I've done, we're just going to get rid of this, remove drawings, clear drawing set, we're going to put a study in here so that we can draw the lines in. Let's flip back to Magic8Ball and let's go to education and notes. And you see, I put a little Magic8Ball study in here. We're just going to simply download this. Potentially dangerous. Oh no, continue download because I wrote it and I know what's in it. So we're going to go to downloads and I'm going to just save it. Then I'm going to go out to my hard drive wherever I saved it. And I'm going to go to downloads and I'm going to extract it here. And in case you're like super wondering what this is, you can actually just open it up in a text editor and view the code. There's really no top secret stuff here. It's a very simple little study. All it does is it plots three lines on the graph for you or I should say on the chart for you. But now we need to add this into Thinkorswim. So let's go back to Thinkorswim. We're going to go to tools up here at the top. You probably used to charts, just go right next to it to tools. And if you want, you can go down here to ThinkScript or you can just click on tools and then go to ThinkScript over here. And you may have some in there already. So if we go here, you can either create or we can import. So we're going to go to import study. And now we need to go to wherever we just downloaded this thing. And it's right there, the magic eight ball study. And you can see the actual code in case you're wondering if there's a virus or some crazy thing in here. There's not, it's very simplistic. All this is doing is drawing three lines with a cloud in between. Now we need to add it to our chart. So we're going to go to this little edit studies button up here. And we can either type it, and there's magic eight ball, or we could have just scroll down, but we're going to just double click to add it. And you can see it's got just some crap numbers in here. Just click this little gear here. And we need to edit these numbers. So let's flip over to magic eight ball and let's pick whichever one we're doing. I'm going to do SPX. I'm going to go to the newest prediction. So predicted close, and I'm just going to copy through the magic of copying paste here. So we're going to do predicted close into close, and then the short term and the long term is 3930. So I'll just remember that. So paste the short term and then 3930 was the long term. And you can change the colors and the line styles and all that and just hit apply. Now we see on our chart a few things. First, we get these beautiful labels up here that tell us exactly what's going on. And we have these lines and it shows us exactly what I would have manually plotted out. This is useful for a couple of things. A, when you enter a trade, you can plop your prediction lines in here and you can see in real time, hey, is this thing going to break out or is it staying kind of within this range? Now it is currently 1027 on December 7th, 2022. In case you're going back for historical purposes. Now one thing I like to do, spoiler alert, these lines will not automatically adjust. I know I wish I could make it do it. There's a reason why it won't. TD Ameritrade or think or swim as it's called will not allow you to import external data. And as you're probably aware, magic eight ball is external to think or swim. It'd be really awesome if they bought this, but they probably won't point being because it won't let me import data, it won't let me magically move these lines around. So if you know of some sort of provider out there, I've looked at things like trading view and a few others, but let me know if there is some sort of charting provider out there that will allow external data to be imported. And then I'll write a study for it that'll move the lines automatically. Until then, this is the best I can do, unfortunately. Another thing I'm going to do in the future is build an actual website with a dynamic real time chart so that lines will move automatically because I'm sick of plugging this in. But let's say the day moves on and things have changed and you've noticed the prediction has changed. Let's just come back in here and you would just re grab these numbers, go back into think or swim, go to your study, go to magic eight ball, click this little gear and then plug the numbers in. Pretty much that simple. Thank you for watching and I hope this helps.