Automate your stock screening using Python

Yong Hong Tan
Level Up Coding
Published in
6 min readJun 21, 2021

--

Get a list of recommended stocks sent to your email every day!

Photo by Tech Daily on Unsplash

Doesn’t it feel great to wake up every morning with a list of stock recommendations emailed to you? Doesn’t it feel even better if you could make that happen by yourself? Here’s how you can do it!

In my previous article, I mentioned how to build a simple technical analysis stock screener. In this tutorial, I am going to show you how to use the stock screener to search for stocks that fit your trading strategies every day, automatically. This is the structure of the article:

  1. Define a trading strategy
  2. Perform screening
  3. Automate the process

Part 1: Define a trading strategy

In this tutorial, I am just going to go for a simple EMA (exponential moving average) bounce strategy. As the name suggests, we try to find a bounce on an EMA trend line, for example, the 50-day EMA.

A TradingView screenshot taken by the author.

As indicated by the above image, our goal here is to hunt for stocks that meet the following requirements after the market closes:

  1. Overall trend is…

--

--