Trade Notifier for LINE Discord Telegram
- Utilities
-
Kazuma Uezono
MQL5 / MQL4 / Pine Script v6 developer and active trader.
Seller on the MQL5 Market (indicators for MT4/MT5).
Services:
- TradingView Pine Script to MT5/MT4 conversion (bar-by-bar matching, with tester report)
- MT4 to MT5 migration - Version: 1.3
- Activations: 5
Trade Notifier sends what happens on your MetaTrader 5 account to LINE, Discord and Telegram: positions opened and closed (with profit or loss and pips), stop-loss and take-profit changes, pending orders, a low margin level, a large floating loss and a daily summary. Discord and Telegram messages can include a screenshot of the chart. Your own indicators and EAs can also send messages through it by writing a small text file.
It is a notification tool only. It never opens, changes or closes a position or an order, and it gives no signals and no trade advice. It uses no DLL. Messages go directly from your terminal to your own LINE official account, Discord webhook or Telegram bot; they do not pass through any server of ours.
Who it is for: traders who want to see on their phone, or share in a Discord channel or a LINE or Telegram group, what their own manual trades or EAs are doing, for example while an EA runs on a VPS. LINE users who used LINE Notify (closed by LINE in March 2025) can send to LINE again through the LINE Messaging API, with differences explained below.
Features
- Three destinations, each on or off, any combination: LINE (Messaging API push, text only), Discord (webhook, text and chart screenshot), Telegram (bot, text and chart screenshot).
- Events, each on or off: position opened, pending order filled, position closed with profit or loss (including swap and commission) and pips, SL / TP changed (positions and pending orders), pending order placed, deleted or expired, margin level below a set % (default 150%), floating loss above a set % of the balance (default 10%), daily summary when the server date changes (closed trades, wins / losses, net profit or loss, balance, equity).
- Messages from other programs: any indicator, EA or script on the same PC can write a text file to the common folder, and Trade Notifier sends it. This also works for indicators, which cannot send web requests themselves. The file format and an MQL code example are in the user guide.
- Filters: all symbols, this chart's symbol only, or a list of symbols; all trades, manual trades only (magic 0), or a list of magic numbers.
- Fewer messages: events within 5 seconds (adjustable 0-60) are combined into one message. LINE has a monthly counter with your own limit (default 180); at 90% you get one warning, at the limit only LINE stops and the other destinations continue.
- Unsent messages are kept in a queue that survives a restart and are sent again later. Each event is sent only once, also after a restart.
- Test send button on the panel: sends a test message to each destination that is on and shows the result.
- Panel: the state of each destination (OK with the HTTP code, not set, URL not allowed, rate limited, error with the reason), LINE messages used this month, messages waiting to be sent, last send time.
- Messages and panel in 11 languages (English, Japanese, Russian, German, French, Chinese, Korean, Turkish, Spanish, Portuguese, Italian), automatic from the terminal language or chosen in the inputs.
- CSV log of every event and every send attempt. Dry run mode writes the requests to files instead of sending them (tokens are masked).
Main Inputs
- LINE: send (default off), channel access token, send to (your user ID or a group ID), monthly limit (default 180, 0 = no limit), people who receive (default 1; LINE counts each person).
- Discord: send (default off), webhook URL, attach a chart screenshot (default on).
- Telegram: send (default off), bot token, chat ID, attach a chart screenshot (default on).
- What to send: position opened, position closed, SL / TP changed, pending orders (all default on), margin level below % (default 150, 0 = off), floating loss over % of balance (default 10, 0 = off), daily summary (default on), messages from other programs (default on).
- Which trades: symbols (all / this chart / list), symbol list, magic numbers (all / manual only / list), magic number list.
- Sending: combine events within (default 5 seconds), give up an unsent message after (default 24 hours, 1-168), time-out of one request (default 5000 ms), language, title on each message (empty = MT5 and the last 4 digits of the account number).
- Panel: show, corner, X / Y offset, font size. Advanced: CSV log, dry run.
How It Works
- Setup: create your LINE official account and channel access token, a Discord webhook or a Telegram bot, then add the server addresses in Tools > Options > Expert Advisors > Allow WebRequest for listed URL: https://api.line.me for LINE, https://discord.com for Discord (the host of your webhook URL; the panel shows which one to add), https://api.telegram.org for Telegram. Then press Test send. The user guide explains every step with the official menus.
- The tool reads the account history and the lists of positions and orders and sends what changed. Times in messages are server time, marked "(server)".
- While the terminal is off, nothing is sent. At the next start the tool sends what happened in between, up to 2 days back, without repeating what was already sent. On the very first start nothing from the past is sent.
- Chart screenshots (Discord and Telegram, on opened, filled and closed positions and on the test send) are taken only if a chart of that symbol is open in the terminal; otherwise the message is sent without an image. The image shows the chart as it is, including this panel and anything else on it.
- If a send fails (no connection, time-out, server error), it is tried again after 10 s, 30 s, 60 s, 2 min, 5 min and then every 10 min, until the give-up time (default 24 hours). HTTP 429 waits as long as the server asks. Messages to one destination are sent in order, so while one destination keeps failing, its later messages wait too; the other destinations are not affected.
- LINE monthly limit: the tool counts LINE messages per person in a calendar month of server time. When your limit is reached, or LINE itself answers that the monthly limit of your plan is reached, LINE stops and the other destinations continue. LINE restarts in the next month, or when you change the monthly limit input; after a stop by LINE's own limit, a successful test send also restarts it. Messages for LINE created while it is stopped are not sent later.
- Only one chart per account sends. If the tool is attached to several charts of the same account, the others show the panel only.
- Messages from other programs: text files in the common folder Terminal\Common\Files\TradeNotifier\queue\ are read every 2 seconds in name order and deleted after reading. First line (optional): the destinations (all, line, discord, telegram) and "shot" for a screenshot; from the second line: the text. Accepted encodings: UTF-8 (with or without BOM), UTF-16 LE with BOM, ANSI. Up to 64 KB per file and 3000 characters of text.
- Discord messages never ping @everyone or roles (mentions are switched off).
Notes and Limits
- Your tokens and the webhook URL are stored as plain text in the EA inputs and in files that keep them: saved input sets (.set), chart profiles and templates (.chr / .tpl). The Strategy Tester log also lists the inputs. Anyone who gets them can post to your LINE account, Discord channel or Telegram bot. Do not share these files or show the input window when you share your screen, and be careful on a shared PC or VPS. If a token leaks, issue a new one.
- By default every message starts with "MT5" and the last 4 digits of your account number (for example [MT5 #…1234]). In shared channels or groups, we recommend entering your own text in the Title input; the heading then shows only that text.
- LINE: text only, no images. You need a LINE official account with the Messaging API enabled, a channel access token and the user ID or group ID to send to. Unlike LINE Notify, messages count against the monthly message quota of your LINE plan (in Japan the free plan currently allows 200 messages a month; prices, quotas and conditions are set by LINE and can change). A group of N people counts as N messages per send: set "people who receive". The counter in this tool is an estimate; LINE's own count (also of messages sent from the same account by other means) is the one that matters. A group ID can only be found with a webhook, which this tool does not provide; sending to your own user ID is the simple setup.
- It works only while MetaTrader 5 is running, connected and the tool is attached to a chart. A VPS is recommended for constant notifications.
- If the same account is logged in on two terminals (for example your PC and a VPS) and both run the tool, both send, so you get every message twice. The common folder for messages from other programs is shared by all terminals on the same PC.
- In rare cases (for example the terminal is killed right after a send), Discord or Telegram can receive the same message twice. LINE uses a retry key that prevents this.
- Netting accounts: a reversal is reported as a close and a new position. This has been checked only in limited ways on real accounts.
- The daily summary is made when the server date changes and counts the trades closed that day that pass the filters (each partial close counts as one trade). If the terminal was off at the date change, the summary of the last day it saw is sent at the next start.
- Strategy Tester: nothing is sent. The messages that would be sent are written to a CSV file only.
- The panel can overlap the One Click Trading panel; by default it is placed lower (Y = 100). Move it with the corner and X / Y inputs.
Compatibility and Support
- MetaTrader 5, hedging and netting accounts, any symbol. Attach it to one chart. Needs an internet connection and WebRequest permission for the addresses above. Telegram and Discord accounts are free; LINE needs a LINE official account (a free plan exists in Japan; availability and quotas in other countries are set by LINE).
- No DLL. Files are written only in MQL5\Files\TradeNotifier\ and in the common folder TradeNotifier\queue\.
- Support through MQL5 messages, reply within 3 business days: installation, settings (LINE, Discord, Telegram, WebRequest) and bug reports. We cannot create or operate your LINE, Discord or Telegram accounts, and we do not give trading advice or market views.
- LINE, Discord and Telegram are trademarks of their respective owners. This product is not made, endorsed or supported by them.
Disclaimer
- This product is a software tool for notifications. It does not trade and is not investment advice. Notifications can be late, missing or duplicated because of the terminal, the internet connection or the services of LINE, Discord and Telegram; do not rely on them as your only way to watch your account. Fees and conditions of LINE plans are your responsibility. Test it with a demo account first.
