Skip to content
Gavin-kai Vida edited this page Dec 28, 2021 · 15 revisions

What is the Stock Bot?

The bot's purpose is to earn money automatically through stocks, with little to no input from the user.

One of the main parts of this program is the Support and Resistance detector. Check it out here

How does it work?

There are main steps the bot uses during the process of trading:

1. Finding stocks in a channel pattern

  • Stocks in a channel pattern are all scraped from the finviz stock screener.
  • Stocks are scraped off finviz stock screener using un-official finviz API
  • The tickers are returned and filed into a list (Stocks)

2. Cycling through each stock and calculating support and resistance

  • The program cycles through the stocks and determines support and resistance using a heavily modified version of gianlucamalato's support and resistance detector
  • It calculates a rating for each stock using an algorithm
  • A positive rating indicates a buy. A negative rating indicates a short.
  • At the end of this entire process, a list of stock dictionaries is returned (more info here)

3. Organizing stocks and data

  • Sorting stocks in a ranked list (sorted by the absolute value of ratings, only the top 10 stocks are kept)
  • Storing ranked list in a JSON file for human reference and easily readability and organization

4. Buying and Selling stocks

  • (wiki to be continued)

APIs, modules, and outside scripts used (for future reference):