00:00This video is part of the AlgoTrader's Toolkit series wherein I share with you
00:04various practical and useful tools that you would need to have in your toolkit
00:08in case you want to become an efficient AlgoTrader. I'm going to be talking about
00:12one of my favorite tools the Charting Scanner. If you are an AlgoTrader and
00:17you're not currently using this powerful tool then you may be missing out on all
00:21the fun. In this video I'm going to be introducing you to a small Python
00:26utility that can automatically scrape and extract charting results into a data
00:30frame. I'm going to demonstrate a practical example of how I use this
00:35utility in one of my own trading strategies and finally talk about how
00:39charting can be of immense help to you in speeding up the process of building and
00:42deploying strategies. I'll be sharing the link to our community website fabtrader.in
00:47and you can download this Python utility for free from this location. So let's
00:51get started. If this is your first time here, welcome. My name is Vivek and I'm a
00:57financially independent AlgoTrader. This channel is all about building a
00:59community of AlgoTraders. We discuss everything about AlgoTrading using Python,
01:03building and backtesting trading strategies, market updates, and much more. Please do
01:06visit our community website fabtrader.in. Also do check out my other YouTube
01:10channel fabwealth where I talk about my own financial independence journey and
01:13share tools, methods, and strategies that help me achieve my financial freedom. Thank you.
01:17Chatting screener doesn't need a lot of introduction. The fact that you have
01:23clicked on this link tells me that you're already aware of what charting is and how
01:26it works. So we're not going to spend a lot of time trying to explain how this
01:30tool works and we will directly jump into the Python utility and see how that
01:35works. At the outset, a charting screener, you typically design or input your
01:41screen and then when you run scan, you get the results here. The Python utility in
01:45question is going to directly scrape this particular screen and then download the
01:49output from this screen into a data frame. And this is the Python utility that
01:53I'm talking about. You would need to install these dependencies, which are
01:57requests, pandas, and beautiful soup 4. And the utility takes primarily two inputs.
02:03One is the URL of the screen, which is this typically. And then the number two is
02:11the scan clause. To find out the scan clause for your respective screens, all you
02:16need to do is just right-click on your web page, go into inspect, then go into
02:20network, and then try running scan. You would see a process, one of these process
02:26comes up and then click on it and then go into payload. And the scan clause is
02:30right at the top. So all you need to do is just copy this part and then input that as
02:39part of your input into the function here. So as I said, it takes two inputs. One is
02:46the URL that we looked at and then the scan clause. And then once you provide this
02:51and then run, you would get the exact same results as you see on the scanner itself.
02:58And this is in a data frame, so now you can go ahead and use this directly in your
03:05algo and then apply various strategy rules on top of it. So this is how simple it is.
03:10This utility is available for free for download. And this is available in our
03:15community website, which is fapprader.in. And then I'll provide the link in the
03:18description. Now that you know how the utility works, let me just give you an
03:21example of how I use it for my strategies. In fact, I use Chatting Screener for
03:25multiple strategies of mine. Here's one example of how I do it. This particular
03:30strategy is called Tridevi. The logic of the strategy is pretty simple. You have
03:35the 5, 20, 50, 100 and 200 SMAs. So whenever these SMAs come together into a
03:41very tight range, range often within 3% of the current closing price, the chances
03:48of it breaking out is pretty high, right? So you typically look for these tight
03:52ranges and scan for those stocks and then wait for the breakout and then trade on
03:57those. That's the overall idea. For example, in the scan that we just ran, HDFC
04:01came up as one of those eligible stocks. So you see there is a tightening of all
04:06the SMAs happening here. The SMAs are all squeezed up in a very tight spot within
04:10the 3% range of the last closing price. And then whenever this happens, for
04:15example, in the previous time this happened, you see this huge breakout rally
04:20happening. And this is what we are actually looking for. And this is my Algo
04:23dashboard that I'd built as part of my Algo trading platform. And Tridevi, I've
04:27been running this on one of my smaller accounts. And the brown part is the
04:33equity curve of the strategy and the white part is the nifty 50. So you see
04:38then the equity curve looks pretty good. The drawdown, the underwater plot is also
04:42like less than 3%. This is actually 0% because this particular strategy does not
04:45have a stop loss. I'd made a couple of mistakes due to which I had to close two of
04:50the trades because of which you see this. Otherwise, you don't close any trades. You
04:54just keep it open until your targets are hit. And even if you look at the
04:58benchmark versus strategy, there's almost a 3 multiplier difference. The strategy
05:04beats the benchmark. So it's a very simple strategy and yet at the same time
05:07very effective. The reason why I love this particular utility and charting
05:11specifically is that this particular logic, if I had to build it within my Python
05:15Algo, it's going to take quite a bit of coding. I won't say it's very complex, but at the
05:19same time, you know, it's not simple either. So it's going to require some
05:23serious amount of coding to get this logic built. But in this case, since
05:27charting does most of the work, all I have to do is just download the results,
05:31pick up the top one, and then apply it to my strategies and make by yourself
05:37decisions based on that. So that's how simple and effective charting can be if
05:41you combine charting and the Python utility that I just talked about. So the
05:46successful combination of charting and the Python utility that I just talked
05:50about can drastically cut down the time it would take for you to automate your
05:53strategies. If you found some value in this video, please consider subscribing
05:56and liking the video. And I will see you soon in another video. Until then, take care. Bye.
Comments