The Scalping Alerts Bot is a Python-based tool designed for cryptocurrency scalping and price action trading. It identifies high-volatility trading opportunities on the Bitget exchange and sends actionable alerts via Telegram. The bot dynamically adjusts its analysis based on the specified timeframe and includes advanced support and resistance detection, ATR-based volatility analysis, and optional order book evaluation.
- Dynamic Analysis:
- Detects opportunities based on adjustable timeframes (e.g., 5m, 15m, 1h).
- Identifies proximity to support and resistance zones.
- Volatility Detection:
- Uses ATR (Average True Range) for dynamic volatility thresholds.
- Incorporates volume-based thresholds for better sensitivity.
- Order Book Analysis (Optional):
- Adjusts thresholds based on bid-ask spread and depth from the Bitget order book.
- Telegram Notifications:
- Sends detailed alerts with take profit (TP), stop loss (SL), leverage suggestions, and other key metrics.
- CSV Export:
- Saves detected opportunities to a CSV file for further analysis.
- Python 3.8+: Programming language used for the bot.
- ccxt: Library for interacting with cryptocurrency exchange APIs.
- Pandas: Data manipulation and analysis.
- NumPy: Numerical operations and calculations.
- Dotenv: Manage environment variables.
- Requests: Send HTTP requests (used for Telegram integration).
- Telegram Bot API: Send notifications via Telegram.
-
Clone the Repository:
git clone https://github.com/your-repo/scalping-alerts-bot.git cd scalping-alerts-bot
-
Set Up Virtual Environment:
python3 -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables: Create a
.env
file in the project root:TELEGRAM_BOT_TOKEN=your_telegram_bot_token TELEGRAM_CHAT_ID=your_chat_id
Update the config.py
file to adjust the bot’s behavior:
- Static Coins:
Ensure certain coins are always included:
STATIC_COINS = ['BTCUSDT', 'ETHUSDT', 'PEPEUSDT']
- Top Coins Limit:
Number of top trading pairs to analyze based on volume:
TOP_COINS_LIMIT = 50
- Timeframe:
Specify the timeframe for data analysis:
TIMEFRAME = '15m' # Options: '5m', '15m', '1h', etc.
- Risk-Reward Ratio:
Define the ratio for calculating TP and SL:
RISK_REWARD_RATIO = 3.0
- Enable Order Book Analysis:
Optional feature for finer threshold adjustments:
ENABLE_ORDER_BOOK_ANALYSIS = True
Run the bot:
python main.py
The bot will:
- Fetch data for top coins from the Bitget exchange.
- Analyze trends, volatility, and support/resistance proximity.
- Send Telegram notifications for detected opportunities.
- Save results to a CSV file.
📊 **Scalping Opportunity Detected**
**Timestamp**: 2024-12-21 18:34:12
**Asset**: BTCUSDT
**Current Price**: 20000.12345
**Support Zone**: 19800.54321
**Resistance Zone**: 20200.67890
**Direction**: Long
**Leverage**: 10x
**Take Profit**: 20250.54321
**Stop Loss**: 19750.12345
**ATR**: 150.54321
**Volume**: 1234567890.00
**Threshold**: 0.00500
.
├── main.py # Entry point of the bot
├── analyzer.py # Analysis logic (volatility, trend detection, etc.)
├── data_fetcher.py # Fetches OHLCV and order book data
├── telegram_notifier.py # Sends Telegram alerts
├── utils.py # Helper functions
├── config.py # Configuration variables
├── requirements.txt # Python dependencies
└── README.md # Documentation
- No Opportunities Found:
- Check the
TIMEFRAME
andMIN_VOLUME_THRESHOLD
settings inconfig.py
.
- Check the
- Errors in Data Fetching:
- Ensure the Bitget API is operational and your network connection is stable.
- Telegram Not Sending Messages:
- Verify your
TELEGRAM_BOT_TOKEN
andTELEGRAM_CHAT_ID
in the.env
file.
- Verify your
- Add advanced machine learning models for better trend predictions.
- Include multiple exchange support.
- Implement real-time dashboards for live monitoring.
This project is licensed under the MIT License. See the LICENSE file for details.