MT5 Trade Alerts: Telegram notifications for your MetaTrader 5
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
- clone the repo
git clone https://github.com/1cbyc/mt5-trade-alerts.git
cd mt5-trade-alerts- install deps
pip install -r requirements.txt- configure env
cp config.example.env config.env
# fill in mt5 + telegram creds- run it
python main.pyrequired 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