Stock Scanner


Core Dependencies

Dependency Description
pandas Dataframe data analysis and manipulation for stock's OHLCV (Open, High, Low, Close, Volume)
numpy Working with pandas
mplfinance Candlestick chart generation
google-search-results Searching public offerings of specific stock from Google
discord.py Sending message to discord server
python-oracledb Oracle database connection

Pre-Requisite

  1. Install Oracle database
  2. Create Discord account and channels
  3. Create discord chatbot and invite it to your server
  4. Create Interactive Brokers trading account, and subscribe market data
  5. Download IB API Gateway from Interactive Brokers official website
  6. Execute create.sql
  7. Edit config.ini, change Oracle login credentials and logger file directory

Local Debug Setup

  1. Run py -m venv VENV_NAME to create project virtual environment
  2. Go to venv directory, then execute activate
  3. Run pip install -r requirements.txt to install dependencies
  4. Debug in your IDE

Build Executable File

  1. Run pip install pyinstaller
  2. Run pyinstaller main.spec to export this project as the executable file in dist folder

Export Dependencies list

  1. Run pip3 freeze > requirements.txt

What It Does

Stock scanner for day trade and swing trade. When specific stock's price action or pattern hit the scanner, the discord chatbot will send message to discord server to notify trader. The scanner scan stocks in U.S stock market for following patterns:

  • Stocks that are popping up very quickly (for intra-day momentum trade)
  • Yesterday bullish daily candle (for intra-day/ swing bullish pattern continuation trade)
  • Previous days' top gainer support (for intra-day/ swing trade, buy at support level looking for bounce)
  • Previous days' top gainer continuation (for intra-day/ swing trade continuation trade, looking for strong momentum after breaking new high)