Forex-Signal-Telegram-Bot (1)
Forex-Signal-Telegram-Bot (1)
Python Project
Automating Trading Signals with Python, Yahoo Finance & Telegram API
SYBCA
The Promise: Automating Forex
Signals for Traders
3 Target Users
Empower forex traders with instant, reliable alerts.
Core Technologies: Python,
Yahoo Finance & Telegram
Access up-to-the-minute forex prices. Analyze past trends and patterns. Seamlessly connects to our Python
Stay ahead of market movements. Improve signal accuracy. script. Streamlined data flow.
Signal Generation: Crafting
Trading Rules with Pandas
Define Rules
Set specific criteria for buy/sell signals. Based on technical
indicators.
Pandas Power
Leverage Pandas for data manipulation. Efficient rule
evaluation.
Backtesting
Test rules on historical data. Optimize for profitability.
Telegram Integration: Setting Up Your Automated Bot
Receive Alerts
Configure
Start receiving instant trading signals.
Create Bot
Integrate the token into your Python script. Directly on your Telegram app.
Use Telegram's BotFather to create a new Authorize the bot.
bot. Get your API token.
CODE :
CODE EXPLANATION :
This script monitors several currency pairs using historical data from Yahoo Finance, calculates technical indicators (Bollinger
Bands and a Stochastic oscillator), and sends trading signals via Telegram during a specific time window.
Key Points:
1. Data Fetching and Indicator Calculation:
- The script retrieves 5 days of minute-level data for each currency pair.
- It computes a 20-period Simple Moving Average (SMA) and standard deviation to form Bollinger Bands.
- It calculates the Stochastic oscillator values (%K and a smoothed %D).
2. Signal Conditions:
**Buy Signal: Triggered when the Stochastic %K is at or below 10 and the price is below the lower Bollinger Band.
**Sell Signal: Triggered when the Stochastic %K is at or above 90 and the price is above the upper Bollinger Band.
3. Telegram Notifications:
- When a valid signal is detected, a message is sent via a Telegram bot.
- A cooldown of 5 minutes is enforced between signals for each trading pair to avoid duplicate alerts.
Advanced Indicators
2
Incorporate more sophisticated
technical indicators.
Customize Rules
Tailor trading rules to your specific 1
preferences.
Machine Learning
Explore machine learning for enhanced
3
signal accuracy.
THANK YOU!!!