TradeMonkey is an automated market trend analyzer that tracks key stock indices, calculates moving averages, RSI, MACD, and provides insights via Telegram. It also generates charts for major indices and sends them to a Telegram group.
- Fetches key stock market data (S&P 500, NASDAQ, ASX 200, etc.)
- Calculates technical indicators:
- 50, 100, and 150-day Moving Averages
- Relative Strength Index (RSI)
- MACD (Moving Average Convergence Divergence)
- Generates and sends trading signals
- Fetches market sentiment from news sources (via NewsAPI)
- Uses GPT-4 to generate key takeaways based on market trends
- Sends automated Telegram updates with market data & graphs
- Generates charts with price trends & MACD analysis
Run the following command to clone the repository and enter the project folder:
git clone https://github.com/silicoon84/tradermonkey.git
cd tradermonkey
Set up a Python virtual environment and activate it:
python3 -m venv market_env
source market_env/bin/activate
Install the required dependencies using pip:
pip install -r requirements.txt
Create a .env
file in the project directory with the following content:
OPENAI_API_KEY=your_openai_api_key
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
NEWS_API_KEY=your_newsapi_key
Save the file.
Execute the script to fetch market data and send updates to Telegram:
python market_checker.py
To schedule the script to run every morning at 7 AM, open the crontab editor:
crontab -e
Add the following line at the bottom:
0 7 * * * /path/to/market_env/bin/python3 /path/to/tradermonkey/market_checker.py >> /path/to/tradermonkey/market_checker.log 2>&1
Save and exit.
Market Overview (50, 100, 150-Day MA)
• S&P 500: 🔴 Mixed Signals (Market Unclear)
- 🟢 MA50 | 🟢 MA100 | 🔴 MA150
- ⚪ RSI 48.3 (Neutral) | 🔴 MACD: Bearish
Key Takeaways
- S&P 500 shows mixed signals but remains under long-term resistance.
- Nasdaq and ASX 200 are below key moving averages, suggesting caution.
- RSI indicates no strong buy/sell signals, and MACD remains bearish.
Generated Graphs:
- Price + Moving Averages
- MACD Analysis
To add or remove markets, edit the MARKETS
dictionary inside market_checker.py
.
Modify the send_telegram_message()
function in market_checker.py
to adjust the message format.
This project is licensed under the MIT License.