https://skool.com/algo-trading
0:01 Hey, Chris Sams here with AlgoTrading. I'm gonna show you a script that gets the relative volume of a stock, uhm, at really whatever time interval you want, and then also the price, uh, at, for that stock at that time.
0:20 So, right now I have it set up to grab every, well, one minute bars. We're looking at the last, we're comparing it against the last 30 days, so that's how it will calculate.
0:30 The relative volume is by calculating it against the last 30 days, but it's gonna look at one minute, one minute bars.
0:40 Uh, so what I'm gonna do is I'm gonna run this script, and you'll see that it's printing out all, you know, obviously this is a one minute, so it's giving us, giving us a whole bunch, you know, for every one minute since the market opened.
0:57 So it's just doing it for the day since the market opened you can see that that during the first minute, uh, the relative volume was a little bit low, you know, 0.91%.
1:08 It was kind of low throughout the beginning of the day, and then at 9.38 you can see that the relative volume did hit one, and then it looks like it started going up, and then at 9.43 the relative volume went up to 16.
1:23 You know, and the price is kind of moving up at that point went from $9.49 or excuse me $4.52 up to $5.00.
1:30 So I at that point it had already almost gone up 10%. Uhm, and then, uh, you know, you can see this whole, this whole thing, you can see all the relative.
1:40 Now, we could, we could change this. We could say, you know, maybe we don't want to see, we don't want to see every single minute bar and the relative volume for every single minute.
1:50 I can move this to a five minute bar by just changing a couple elements in here to make sure that it gets us just the five minute bar right here as well.
2:05 We need to put a five minute bar there. All right. So then I'm, I'm just going to save that and then we'll open the file again and then rerun this, rerun it again.
2:17 It's going to rerun it, but this time it's just going to give us, um, Oh, it gave me an error.
2:29 When I changed it to five minutes, I had to, I needed to put an S on the end of it cause it went from one min to five min.
2:36 So I'm just going to put an S on the end of there and save that. Open that file. All right.
2:43 Now let's, now let's go ahead and run that. All right, there we are. So there is the five minute, um, that's the five minute bar giving us the price and the relative volume every five minutes.
3:00 Again, you can see, See when the market opened for this ticker, the ticker that we were using was the one that moved a lot today was, uh, ATGL.
3:08 But you can see that for the first, uh, five, 10 minutes of the day, it did not actually move very much.
3:15 It was, the relative volume was below, below one. And then it went up to five. You can actually see that it halted for five minutes cause there was no volume, no volume here.
3:28 And then the volume jumped up to 10. And so you can see that. Um, this, this stock went up a lot and then the, and then the volume started going up a lot.
3:37 And then you can kind of watch the volume along with the price as the volume continues to go up. And you can see further kind of near the end of the day, around noon, you had spikes there for five minutes where it was 150 times the regular volume.
3:51 Um, just kind of kept, kept moving up. So, um, this is definitely a very valuable script to be able to grab the relative volume.
4:01 over any period of time. This particular stock, all it does is it just like from the, from the moment that the script is executed, it, it goes from the start of the day up to that point.
4:12 Um, so right now we're still in the middle of the trading day. It's, you know, it's, um, 15 minutes till close.
4:17 So it's grabbed everything up to that point. So it just grabbed everything up to that point and kind of, so great script to be able to calculate, um, relative of volume, if a lot of people are buying the stock and the volume is there.
4:31 Going up, um, and then also grabbing the price for each one of those relative volume bars to see, um, how the price is moving along with, along with the volume.
4:41 So this is definitely, um, a valuable script to integrate into any of your algal strategies. This script is also available in my script library.
4:49 Uh, just follow the link in my bio to grab it out of the script library. Thanks.
                         
                    
Информация по комментариям в разработке