Quick start
Install the MetaTrader 5 Expert Advisor
- In MetaTrader 5, open
File → Open Data Folder, then go toMQL5 → Experts. - Copy the
TradeBridgeEA.ex5(or.mq5) file there and restart MT5, or refresh the Navigator. - In MT5, enable
Tools → Options → Expert Advisors → Allow WebRequest for listed URLand add your TradeBridge server URL. - Drag the EA onto any chart. In its inputs, paste your license key and confirm the server URL.
- Allow Algo Trading (the button in the toolbar). The account should show as connected on your dashboard within a few seconds.
EA inputs
When you attach the EA to a chart, set these inputs. Only the license key is strictly required; the rest have sensible defaults.
| Input | What it does | Default |
|---|---|---|
InpLicenseKey | Required. Links the terminal to your account/license | — |
InpApiBaseUrl | TradeBridge server URL (must be added under Allow WebRequest) | https://tradebridge.live |
InpMagic | Magic number stamped on EA orders (so it only manages its own trades) | 990099 |
InpSlippage | Max deviation/slippage allowed on fills (points) | 20 |
InpMaxSpreadPips | Skip an entry if the live spread is wider than this (pips). 0 = no limit — protects against news-spike fills | 0 |
InpTrailStartPips | Default profit (pips) before trailing activates | 20 |
InpTrailStepPips | Default trailing distance (pips) | 10 |
InpPollMs | How often the EA polls for new signals (ms) | 1000 |
InpHeartbeatSec | Heartbeat interval that keeps the account "online" (seconds) | 30 |
Create a TradingView alert
- Open your chart/strategy in TradingView and click Alert (the clock icon).
- Set your condition as usual.
- Under Notifications, enable Webhook URL and paste:
https://tradebridge.live/api/webhook/tradingview
- In the alert Message box, paste your command (from the Alert Builder), e.g.:
BUY,EURUSD,VOLUME=0.10,SL=50,TP=100,KEY=TB-XXXX-XXXX
- Click Create. Done — when the alert fires, the trade is placed automatically.
Alert syntax reference
An alert message is a comma-separated command. The first token is the action, the second is the symbol, followed by optional KEY=VALUE pairs. KEY= (your license) is always required.
| Parameter | Meaning | Example |
|---|---|---|
| symbol | TradingView ticker (mapped to your broker symbol) | EURUSD |
VOLUME= / LOT= | Fixed lot size (overrides risk-profile sizing) | VOLUME=0.55 |
RISK= | Size by % of balance/equity using the SL distance | RISK=1 |
SL= | Stop loss in pips | SL=50 |
TP= | Take profit in pips | TP=100 |
PRICE= | Entry price (required for pending orders) | PRICE=1.0850 |
TRAIL= | Trailing-stop distance in pips | TRAIL=20 |
TRAILSTART= | Profit in pips before trailing activates | TRAILSTART=30 |
ATR= | Size the stop loss from volatility (ATR × this multiplier) instead of a fixed SL= | ATR=1.5 |
TP1= | Partial take-profit distance (pips). At this profit the EA closes part of the trade and moves the stop to breakeven | TP1=20 |
PARTIAL= | % of the position to close when TP1= is hit (default 50) | PARTIAL=50 |
BE= | Lock the stop this many pips beyond entry after TP1= (0 = exact breakeven) | BE=1 |
COMMENT= | Free-text label — also used as the strategy name in Performance analytics | COMMENT=breakout |
KEY= | Required. Your license key | KEY=TB-XXXX-XXXX |
Actions
The first token is the action. Entries respect your risk profile and guardrails; close/management actions always go through (even when an account is paused).
| Action | What it does |
|---|---|
BUY / SELL | Open a market position in that direction |
BUYLIMIT / SELLLIMIT | Place a pending limit order (needs PRICE=) |
BUYSTOP / SELLSTOP | Place a pending stop order (needs PRICE=) |
CLOSE | Close all open positions for the symbol |
CLOSEBUY / CLOSESELL | Close only the long / only the short positions for the symbol |
CLOSEALL | Close every open position on the account |
PARTIALCLOSE | Close part of the position — VOLUME= is the fraction (e.g. 0.5 = half) |
BREAKEVEN | Move the stop on open positions to the entry price |
TRAILSTART / TRAILSTOP | Enable / disable trailing on existing positions for the symbol |
JSON format
Prefer JSON? The webhook accepts it too — handy if your TradingView strategy emits structured alerts. Keys mirror the parameters above (licenseKey, action, symbol, risk, sl, tp, volume, price, trail, trailStart, comment, accountId, nonce).
{
"licenseKey": "TB-XXXX-XXXX",
"action": "BUY",
"symbol": "EURUSD",
"risk": 1, "sl": 50, "tp": 100,
"comment": "breakout"
}
Examples
# Fixed-lot entry with SL/TP BUY,EURUSD,VOLUME=0.55,SL=50,TP=100,KEY=TB-XXXX # Risk 1% of balance with a trailing stop SELL,XAUUSD,RISK=1,SL=120,TRAIL=40,TRAILSTART=60,KEY=TB-XXXX # Pending buy-limit order BUYLIMIT,GBPUSD,PRICE=1.2500,SL=40,TP=120,KEY=TB-XXXX # Volatility stop (ATR×1.5) + auto take 50% at +20p and lock breakeven BUY,XAUUSD,RISK=1,ATR=1.5,TP1=20,PARTIAL=50,BE=1,KEY=TB-XXXX # Take half off the table, then close the rest PARTIALCLOSE,EURUSD,VOLUME=0.5,KEY=TB-XXXX CLOSE,EURUSD,KEY=TB-XXXX
Risk & sizing
Three ways to size, in priority order:
VOLUME=— an explicit fixed lot, overrides everything else.RISK=— a % of balance or equity; the lot is computed from your SL distance so the worst-case loss matches that %.- Risk profile default — if the alert omits sizing, the account's risk profile decides (Fixed lot, Balance %, or Equity %).
Set defaults and per-account multipliers under Risk Profiles and Accounts in the app.
Risk guardrails
A risk profile (assigned per account) enforces hard limits before any trade is sent. A blocked signal is recorded with the reason in your dashboard signal feed and triggers a notification.
| Guardrail | Effect when breached |
|---|---|
| Max open trades | New entries are rejected while you're at the cap |
| Max daily loss | New entries rejected once today's net realized loss hits the limit |
| Max drawdown % | New entries rejected when equity is down more than X% from balance |
| Max lot | Every computed lot is clamped to this ceiling |
| Kill switch on daily loss | On breach, all open positions are closed and the account is auto-paused until the next day |
Your dashboard shows a per-account daily-loss meter (today's P/L vs the limit) so you can see how close you are before the cap trips.
Trailing stops
Add TRAIL= to trail the stop by a fixed pip distance as price moves in your favour. Pair it with TRAILSTART= so trailing only begins after the trade is that many pips in profit. Trailing runs continuously on the EA between signals, respects your broker's minimum stop distance, and is breakeven-guarded — it never moves a stop to lock in a loss.
Protecting your stops
Three tools help a noisy market reversal avoid taking out your full stop loss. They compose — a volatility stop sets a sensible initial SL, TP1 neutralises the risk, then the remainder trails from breakeven.
ATR=(volatility stop) — sizes the SL from recent volatility (Average True Range × the multiplier) so it sits outside normal noise instead of a fixed pip count. Use it in place ofSL=. Your EA can also apply it automatically to any signal that arrives without an SL.TP1=+PARTIAL=(partial take-profit) — once price runsTP1=pips into profit, the EA closesPARTIAL=% of the position and moves the stop to breakeven. After that, the worst case on the rest is a scratch, not a full SL. If the lot is too small to split it still locks breakeven.BE=(breakeven+) — locks the post-TP1 stop a few pips beyond entry, banking a small profit rather than exact breakeven.
Trading hours
A risk profile can define a trading-hours window (start/end in IST) and allowed weekdays. Opening signals outside the window or on a disallowed day are rejected — but close/management actions still go through, so existing positions can always be managed. Leave the window blank for 24/7.
Symbol mapping
Brokers name symbols differently (EURUSD.m, XAUUSD vs GOLD, suffixes like .raw/+). TradeBridge handles this two ways:
- Per-account mappings — under Accounts → Symbols, map a TradingView symbol to your exact broker symbol. A Test button shows what MT5 will receive.
- Automatic resolution — for anything unmapped, the EA matches your broker's prefix/suffix conventions automatically.
Pause & kill switch
Stop trading instantly without deleting any setup:
- Pause an account (Accounts → Pause) — rejects new entries; closes still work. Resume any time.
- Daily-loss kill switch — automatic flatten + pause when the daily-loss cap is hit (see Guardrails).
- Global kill switch (admin) — pauses all trading platform-wide in one click.
Multi-account copy trading
Attach several MT5 accounts to one license and a single alert is mirrored to all of them. Each account can have its own lot multiplier, risk multiplier, and optional inverse (reverse-direction) setting — ideal for managing multiple accounts or hedging.
Notifications
TradeBridge keeps you informed in-app and on your preferred channels. The bell icon in the app is your inbox; add a phone number or Telegram chat id under Profile to also receive alerts by email, SMS, WhatsApp, or Telegram. Events include: trade closed, terminal offline, a signal blocked by a risk control, the daily-loss kill switch firing, and subscription/renewal notices. A weekly performance summary email lands every Monday.
Performance analytics
The Performance page turns your closed trades into insight: an equity curve and drawdown chart, plus win rate, profit factor, expectancy, payoff, win/loss streaks and P/L by strategy (grouped by your alert COMMENT=). The Reports page adds per-symbol / per-day / per-account breakdowns and CSV export.
Billing & plans
Pay with Razorpay or Cashfree — pick either at checkout. Plans are monthly or annual, with optional free trials and promo codes. Choose auto-renew (a recurring mandate/UPI Autopay) or a one-time payment. Every successful payment produces a sequential GST tax invoice (and a credit note on refund), downloadable from your Billing page.
Affiliate program
Resellers get a referral code/link. Anyone who signs up through it is attributed to you, and a commission accrues on their payments — track pending and paid earnings on the Affiliate page.
Security
- Two-factor authentication is mandatory — you enroll an authenticator app on first login; recovery codes are issued for backup.
- Webhook signing — set a webhook secret on your license and TradeBridge verifies an HMAC
X-TB-Signatureon every alert. An optional IP allow-list and short-lived nonce/timestamp anti-replay further lock it down. - Login activity — your Profile shows recent sign-ins (success and failed) with IP, so you can spot anything suspicious.
- We never store your MT5 password — the EA connects outbound with your license key only.
Troubleshooting
My account shows "offline" / not connected
The signal is "Rejected — Unknown license key"
KEY= value doesn't match an active license. Pick the correct license in the Alert Builder, or ask an admin to issue/activate one.Signal rejected — "Account paused" or "Trading is globally paused"
Signal rejected — "Outside trading hours" or a risk cap
Trade didn't open — "symbol not found" or "spread too wide"
EURUSD.m). "Spread too wide" means InpMaxSpreadPips blocked a news-spike fill — raise it or leave it 0 to disable. Also confirm the market is open and margin is sufficient.