I built a small utility to keep me posted on my MT5 activity without living inside the terminal: MT5-trade-alerts. It sits alongside your MetaTrader 5 terminal, watches trades/orders/price levels, and pushes tidy Telegram alerts in real-time.
What it does
- trade alerts – notifies when positions open/close, with profit/loss details.
- order alerts – buy/sell limits, stops, and executions.
- price level alerts – configurable levels per symbol, alerts when price crosses or hits.
- profit tracking – suggests partial profit-taking when positions are in the green.
- continuous monitoring – runs on an interval you set.
Quick start
1) clone the repo
bashgit clone https:"syntax-comment">//github.com/1cbyc/mt5-trade-alerts.git cd mt5-trade-alerts
2) install deps
bashpip install -r requirements.txt
3) configure env
bashcp config.example.env config.env "syntax-comment"># fill in mt5 + telegram creds
4) run it
bashpython main.py
Required bits
- Python 3.8+
- Metatrader 5 installed (with your login/server/path)
- Telegram bot token (from @BotFather)
- Telegram chat id (your user/group id)
Key files
config.env– MT5 creds, Telegram creds, alert toggles, interval.price_levels.json– per-symbol levels (above/below/both) with ids and descriptions.main.py– service entrypoint (connects to MT5 + Telegram, starts monitoring).manage_levels.py– helper to edit price levels.mt5_monitor.py– core watcher.
Alert flavors
trade alert (open/close): ticket, symbol, type, volume, prices, profit, time. order alert: pending orders + executions. price level: when a level is hit/crossed, with direction and context.
Config knobs
PRICE_CHECK_INTERVAL– seconds between checks.ENABLE_TRADE_ALERTS,ENABLE_ORDER_ALERTS,ENABLE_PRICE_ALERTS– feature toggles.price_levels.json– add as many levels per symbol as you want.
Troubleshooting notes
- Mt5 not connecting? Verify
MT5_PATH, login/server, and that the terminal can start. - No Telegram messages? Confirm bot token + chat id, and that you've started a chat with the bot.
- No alerts firing? Check you actually have trades/orders/levels and that intervals aren't huge.
- Logs: console plus
mt5_alerts.log.
Why this exists
I wanted clean, actionable alerts without babysitting the terminal. This keeps me in Telegram, flags profitable trades for partial exits, and catches price level touches so I don't miss them.
Repo: MT5-trade-alerts