TBM Telegram To MT5 Copier Settings Input Guide MT4/MT5

TBM Telegram To MT5 Copier Settings Input Guide MT4/MT5

27 July 2026, 08:14
Biswarup Banerjee
0
27

Complete User Documentation — MT5

1. OVERVIEW

TBM Telegram To MT5 Copier is an Expert Advisor that turns trade calls posted in a Telegram channel into notifications and (optionally) real trades on your MT5 account. It works alongside a companion Windows desktop application — Telegram Scraper — which reads your Telegram channel, parses each message into a structured trade signal (symbol, side, entry, stop loss, take profit list, confidence), and exposes those parsed signals over a small local API on your own machine. This EA polls that local API and, for every new signal, either notifies you or places/closes the trade itself, depending on how you configure it.

In short: Telegram channel → Telegram Scraper desktop app (reads & parses) → this EA (polls, validates, acts) → your MT5 account. The desktop app never touches your broker account directly; this EA is the only component that places or closes trades, and it only does so if you explicitly turn that on.

Who Should Use It: Traders who follow a Telegram signal channel (their own or someone else's) and want those calls copied to an MT5 account automatically, without manually typing in every order — whether that means a simple notification the moment a signal arrives, or fully automated execution.

Main Benefit: Removes the delay and manual effort between "a signal appears in Telegram" and "the trade is live in MT5" — and just as importantly, it also understands and executes close instructions from the same channel, not only entries.


2. REQUIREMENTS — READ THIS BEFORE PURCHASING

This product has two parts, and you need both running for it to work:

  1. The Telegram Scraper desktop app (Windows). This is a separate installer, provided to you after purchase together with your license key. It logs into Telegram with your own account/API credentials, monitors the channel(s) you configure, and parses messages into trade signals. It must be running on the same Windows machine as your MT5 terminal — it exposes signals to the EA over http://127.0.0.1:8765 by default (localhost only, never exposed to the network).
  2. This EA, attached to a chart in that same MT5 terminal. It polls the desktop app's local API on a timer, validates each signal, and notifies/executes accordingly.

Both parts share one license (see Section 4, LICENSE). You activate the license once in the desktop app; the EA reads your license number from the desktop app automatically and registers its own device session against the same license — you do not enter a license number into the EA itself.


3. SETUP

Step 1 — WebRequest allow-list (do this first)

MT5 blocks all outbound HTTP calls from an EA by default. If you skip this step, every poll silently fails with WebRequest error 4060 or 4014 .

  1. Open the MT5 terminal.
  2. Go to Tools > Options.
  3. Open the Expert Advisors tab.
  4. Check "Allow WebRequest for listed URL".
  5. Add both of the following URLs (or whatever you changed API_BASE_URL / LICENSE_API_URL to):
    http://127.0.0.1:8765
    https://www.tradingbotmaker.com
  6. Click OK.

If either URL is still missing, the EA pops up a reminder dialog the first time it hits that error (shown once, so it never blocks the terminal on every retry) and also logs it to the Experts tab.

Step 2 — Install and license the desktop app

  1. Install the Telegram Scraper desktop app you received after purchase.
  2. On first launch, enter the license key you were given and activate it.
  3. Log in with your Telegram account and add the channel(s) you want to follow.
  4. In the app's Settings, enable "Enable local API stub" — this is what lets the EA reach it. It is off by default.

Step 3 — Attach the EA

  1. Compile/attach TBM Telegram To MT5 Copier.mq5 to a chart for the symbol/account you want it to trade on.
  2. Fill in LICENSE_API_KEY in the LICENSE input group with the key provided to you at purchase — this is required, the EA will fail to initialize without it (see the LICENSE section below).
  3. Leave AUTO_EXECUTE = false for your first run (notify-only) until you've confirmed everything is working. See Section 5.

4. INPUT PARAMETERS & SETTINGS

Inputs are grouped in the EA under banner headers, matching the tables below.

General Settings

Setting Name Type Default Value Description
API_BASE_URL string http://127.0.0.1:8765 Base URL of the local Telegram Scraper API. Must match the WebRequest allow-list entry and the desktop app's own local API port setting.
PRODUCT_NAME string TelegramTradeCopier Internal product identifier sent on license activation. Do not change this.
LICENSE_API_URL string https://www.tradingbotmaker.com/api Base URL of the licensing backend. Must match the second WebRequest allow-list entry.
POLL_INTERVAL_SECONDS int 3 Seconds between each check for new signals.
SIGNAL_STATUS_FILTER string pending Which signal status to request from the API — leave at the default.
SIGNAL_FETCH_LIMIT int 50 Max signals fetched per poll.
HTTP_TIMEOUT_MS int 3000 HTTP request timeout in milliseconds.
MAGIC_NUMBER int 24680001 Tags every order this EA places. Also scopes the trade-count safeguards and the idempotency ledger — use a different magic number per chart/instance if you run more than one.
TRADE_COMMENT string TG-Signal Comment attached to every order this EA places.
AUTO_EXECUTE bool false The single most important setting. false = notify-only, never places a trade. true = places and closes real trades. See Section 5.
SHOW_LOGS bool true Print log lines to the Experts tab.
SHOW_DASHBOARD bool true Show the on-chart status panel (Section 6).

Symbol Mapping

Setting Name Type Default Value Description
SYMBOL_SUFFIX string (empty) Appended to a signal's symbol when no manual override matches — e.g. ".m" turns XAUUSD into XAUUSD.m to match your broker's symbol naming.
SYMBOL_MAP_OVERRIDES string (empty) Manual symbol map, format "FROM:TO,FROM:TO" (e.g. "XAUUSD:GOLD.m,US30:DJI.m"). Checked before the suffix fallback.
ALLOWED_SYMBOLS string (empty) Comma-separated symbol whitelist. Empty means every symbol the channel sends is allowed.

Signal Filtering

Setting Name Type Default Value Description
MIN_CONFIDENCE double 0.7 Minimum parser confidence (0–1) required to accept a signal. Messages the parser is unsure about are rejected rather than guessed at.
ALLOWED_SIDES enum BOTH_SIDES Restrict to LONG_ONLY, SHORT_ONLY, or BOTH_SIDES.
REQUIRE_SL bool true Reject any signal that has no stop loss.
REQUIRE_TP bool false Reject any signal that has no take profit.
MAX_SIGNAL_AGE_SECONDS int 300 Reject a signal if it's older than this many seconds by the time it's processed — protects against acting on a stale message after a restart or an outage.

Position Sizing

Setting Name Type Default Value Description
DEFAULT_LOT double 0.01 Lot size used when a signal doesn't specify one and risk-based sizing is off.
ENABLE_RISK_SIZING bool false When true, size the trade by risk percent instead of a fixed lot (requires the signal to carry both an entry and a stop loss; otherwise falls back to DEFAULT_LOT).
RISK_PERCENT double 1.0 Percent of account balance risked per trade when risk-based sizing is used.
MIN_LOT_OVERRIDE double 0 Minimum lot clamp for risk-sized trades. 0 disables (uses the broker's own minimum).
MAX_LOT_OVERRIDE double 0 Maximum lot clamp for risk-sized trades. 0 disables (uses the broker's own maximum).

Safeguard Settings

Setting Name Type Default Value Description
MAX_SPREAD_POINTS long 0 Rejects a new entry if the current spread exceeds this many points (entries only). 0 disables the check.
MAX_SLIPPAGE_POINTS int 20 Maximum allowed slippage, in points, on any order this EA places or closes.
MAX_ENTRY_DEVIATION_POINTS long 0 Rejects a new entry if the signalled price has drifted more than this many points from the live quote by the time it's processed (entries only — close signals are never subject to this check). 0 disables the check.
MAX_OPEN_TRADES int 0 Blocks new entries once this many trades (matching this EA's magic number) are open at once. 0 disables the check. Existing positions can still always be closed by signal.
MAX_TRADES_PER_DAY int 0 Blocks new entries once this many trades have been placed today (matching this EA's magic number). 0 disables the check.
MAX_DAILY_LOSS_PERCENT double 0 Blocks new entries for the rest of the day once today's realized loss reaches this percent of account balance. 0 disables the check.
MAX_DAILY_LOSS_AMOUNT double 0 Blocks new entries for the rest of the day once today's realized loss reaches this account-currency amount. 0 disables the check.
TRADING_START_TIME string (HH:MM) 00:00 Start of the daily window (terminal time) during which new entries are allowed.
TRADING_END_TIME string (HH:MM) 23:59 End of the daily window (terminal time) during which new entries are allowed.
KILL_SWITCH bool false Master kill switch. When true, blocks everything — entries and closes alike — at the same top tier as an invalid license.

Alerts

Setting Name Type Default Value Description
ALLOW_ALERT bool false Show a terminal popup for notify-only signals (and rejections, if ALERT_ON_REJECTED is on).
ALLOW_NOTIFICATION bool false Send an MT5 mobile push notification for the same events.
ALLOW_EMAIL bool false Send an email (via your terminal's configured mail settings) for the same events.
ALERT_ON_REJECTED bool true Also fire alerts/notifications/emails when a signal is rejected, not only when acted on.

Ledger

Setting Name Type Default Value Description
LEDGER_SUBFOLDER string TelegramSignalEA\Ledger Where processed-signal records are stored under MQL5/Files/, so a restarted or reattached EA never double-acts on the same signal. Leave at the default unless you have a specific reason to change it.
API_OUTAGE_LOG_INTERVAL_SECONDS int 60 Minimum seconds between repeated "API unreachable" log lines during an outage, so the log doesn't fill up with the same message every poll.

License

Setting Name Type Default Value Description
LICENSE_RECHECK_INTERVAL_TICKS int 600 How often (in poll ticks) the EA re-checks your license with the backend — roughly every 30 minutes at the default 3-second poll interval.
LICENSE_API_KEY string (empty — required) The license API key provided to you at purchase. Must be filled in exactly as given — the EA cannot initialize without it (it will fail with an authorization error against the licensing backend).

You do not enter your license number here — the EA reads it automatically from the Telegram Scraper desktop app once that app's license is activated (Section 3, Step 2). If the desktop app's license is invalid, expired, or over its device limit, this EA will not trade — see Section 7.


5. HOW IT WORKS

Core Logic — What Happens Every Poll

On a timer (every POLL_INTERVAL_SECONDS ), the EA:

  1. Re-checks the license periodically and re-evaluates all safeguards (kill switch, trading window, trade caps, daily loss limits) — if anything trips, it sits out that cycle and resumes automatically once the condition clears.
  2. Requests any new signals from the desktop app's local API.
  3. For each new signal, skips it if already processed (idempotency ledger), then dispatches by signal type:
    • Entry signals run through a full validation gauntlet: parser confidence, allowed side, stop-loss/take-profit requirements, signal age, symbol whitelist/mapping, live spread, entry-price deviation from the current quote, broker volume/step limits, stop-level distance, and margin. If it passes, the EA either notifies you (default) or places a real market order sized per your Position Sizing settings, using the first take-profit level if the signal lists more than one.
    • Close signals (the channel telling you to close a position) run through a lighter check — mainly symbol resolvability and signal age — and, if it passes, the EA either notifies you how many positions it would close, or actually closes every open position matching its magic number and symbol (narrowed by side if the close message specified one).
  4. Refreshes the on-chart dashboard.

Entries vs. Closes — Why This Matters

Entry (BUY/SELL) signal: the channel posts a new trade call with a symbol and side, typically with a stop loss and one or more take-profit levels. This EA either logs/alerts it (notify-only) or opens a new position (auto-execute).

Close signal: the channel posts an instruction to close an existing position — separate from a new entry. This EA recognizes these as a distinct signal type and, in auto-execute mode, actually closes the matching open position(s) rather than opening anything new. This is what makes the copier a genuine two-way relationship with the channel: it doesn't just open what you're told to open, it also closes what you're told to close.

Best For: Any Telegram channel that posts clear entry calls (symbol, side, SL/TP) and, at least sometimes, explicit close instructions for open trades.

Step-by-Step Workflow

Step 1: Install & License the Desktop App. Set up Telegram Scraper and activate your license.

Step 2: Connect Your Channel. Log in with Telegram inside the desktop app and add the channel you want to follow.

Step 3: Enable the Local API. Turn on the local API stub in the desktop app's settings.

Step 4: Attach the EA. Add this EA to an MT5 chart, whitelist both required URLs, and enter your LICENSE_API_KEY .

Step 5: Start in Notify-Only Mode. Leave AUTO_EXECUTE=false and confirm signals are being received and logged correctly.

Step 6: Tune Your Filters. Set your symbol mapping, confidence threshold, allowed sides, and safeguards to match your risk tolerance.

Step 7: Go Live. Once you're confident in the results, test on a demo account with AUTO_EXECUTE=true before ever pointing it at a live account.


6. ON-CHART DASHBOARD

A compact status panel in the top-left corner of the chart shows, at a glance: whether the EA is active or inactive (and why, if inactive — e.g. an invalid license, the kill switch, or a tripped safeguard), whether the local API is reachable, the last poll time, and running counters for received, executed, rejected, notified, and closed signals this session.


7. RISK MANAGEMENT & SAFEGUARD FEATURES

Feature Description
Master Kill Switch One setting stops everything instantly — entries and closes alike. The only safeguard that goes this far; used for "I need this fully silent right now."
License-Gated Trading If your license becomes invalid, the EA halts entirely, at the same level as the kill switch — it never trades on an unlicensed or expired install.
Entries-Only Safeguards Trading window, max open trades, max trades per day, and daily loss limits all block new entries only — an existing position can still always be closed by signal, because closing reduces risk rather than adding it.
Entry Price Deviation Guard Rejects an entry if the signalled price has drifted too far from the live market quote by the time it's processed — protects against acting on a stale or delayed signal.
Spread & Slippage Guards Reject trades when the current spread is too wide, and cap allowed slippage on execution.
Daily Loss Limits Cap today's realized loss by percent or absolute amount before new entries are disabled for the rest of the day.
Idempotent Ledger Every processed signal is recorded locally, so a restarted or reattached EA never acts on the same signal twice.
Symbol Whitelist & Mapping Restrict which symbols can be traded at all, and map the channel's symbol names onto your broker's actual naming.

Quick Start Guide

Follow these steps to get started:

  1. Install & License: Set up the Telegram Scraper desktop app and activate your license.
  2. Connect Telegram: Log in and add your channel inside the desktop app.
  3. Enable the Local API: Turn it on in the desktop app's settings.
  4. Whitelist Both URLs: In MT5, Tools > Options > Expert Advisors > allow WebRequest for both required URLs.
  5. Attach the EA: Enter your LICENSE_API_KEY , leave AUTO_EXECUTE=false for now.
  6. Watch It Work: Confirm signals appear on the dashboard and in the Experts log as they arrive.
  7. Go Live When Ready: Tune your filters and safeguards, test on demo with AUTO_EXECUTE=true , then move to a live account.

Installation Guide for MQL Products | Updating Purchased MQL Products on MT4/MT5 | General Troubleshooting Guide | Backtest and Set Files

Check all my products: https://www.mql5.com/en/users/biswait50/seller

Contact me for support: https://www.mql5.com/en/users/biswait50

Download the desktop app from here