Back to Synnectra

Documentation

Everything you need to connect TradingView to MetaTrader 5 and start automating your trading signals.

Quick Start

Get up and running in under 5 minutes. Synnectra bridges your TradingView alerts directly to your MetaTrader 5 terminal with sub-16ms execution latency.

1

Create a Synnectra account

Sign up at synnectra.com/register. You get a 14-day free trial with full access. A unique License ID and Secret Key are generated automatically for your account.

2

Download and install the EA

Download Synnectra.ex5 from your dashboard. Place it in your MT5 Experts folder (File → Open Data Folder → MQL5/Experts). Compile if needed, then drag it onto any chart.

3

Configure the EA inputs

Set your Account ID (License ID) from the dashboard. Optionally set your Webhook Secret for signal authentication. See EA Setup for details.

4

Create a TradingView alert

Set the webhook URL to your Synnectra endpoint and write the alert message using PineConnector syntax. See Syntax Reference for all supported parameters.

5

Done!

When the alert fires, TradingView sends the signal to Synnectra, which forwards it to your MT5 EA via ZeroMQ. The trade executes automatically.

EA Setup

The Synnectra Expert Advisor runs inside MetaTrader 5 and listens for trade signals from the Synnectra cloud via ZeroMQ.

Installation

  1. Download Synnectra.ex5 from the Active Accounts page in your dashboard.
  2. Open MT5 and go to File → Open Data Folder.
  3. Navigate to MQL5/Experts/ and copy the Synnectra.ex5 file there.
  4. Restart MT5 or refresh the Navigator panel (right-click → Refresh).
  5. Drag Synnectra from the Navigator onto any chart. Ensure Allow Algo Trading is enabled.

EA Input Parameters

ParameterDescriptionRequired
Account ID Your unique License ID from the Synnectra dashboard. The EA uses this to subscribe to your signal stream via ZeroMQ topic filtering. Yes
Webhook Secret Your Signal Authentication secret key from the dashboard. When set, the EA rejects any signal that doesn't include this secret. Leave empty to accept all signals (less secure). Recommended

The EA automatically maintains a persistent ZeroMQ connection to the Synnectra cloud. It reconnects on disconnection and has built-in deduplication to ignore duplicate signals within a 5-second window.

Dashboard Overview

The Synnectra dashboard is where you manage your account, view trades, configure settings, and monitor performance.

Active Accounts

View your connected trading accounts, see connection status (online/offline based on EA heartbeat), current balance, and last seen timestamp. You can rename accounts or delete them.

Signal Authentication

Located on the Active Accounts page. A Secret Key is automatically generated when you register. This key must be included in your TradingView alert messages to authenticate signals. See Signal Authentication for full details.

Symbol Mapping

Map TradingView symbol names to your broker's symbol names. For example, map EURUSD to EURUSDm if your broker uses a suffix. See Symbol Mapping.

Trades

View your complete trade history including entry/exit prices, lot sizes, P&L, execution latency, and signal IDs. Filter by date range.

Security

Manage your password, two-factor authentication (2FA), and active sessions.

Full Syntax Reference

TradingView alert messages use a comma-separated format (PineConnector syntax). The signal is sent as the body of a POST request to your webhook URL.

Basic Format

Format LicenseID,Action,Symbol[,key=value,...]

Required Fields

PositionFieldDescription
1License IDYour unique account ID from the dashboard (e.g., abc12345)
2ActionTrade direction: BUY, SELL, CLOSE, or CLOSEALL
3SymbolThe trading instrument (e.g., EURUSD, XAUUSD). Case-insensitive.

Optional Key=Value Parameters

KeyAliasesDescription
vol_lots Fixed lot size. Example: vol_lots=0.1
vol_percent risk, vol_pct_bal_loss Risk percentage of account balance. Example: vol_percent=2 risks 2% of balance. When used with sl_pips, calculates lot size to risk exactly that percentage.
vol_dollar Fixed dollar amount to risk. Example: vol_dollar=50
sl_pips sl Stop loss distance in pips. Example: sl_pips=20. The EA converts pips to an absolute price at execution time.
tp_pips tp Take profit distance in pips. Example: tp_pips=40
sl_price Absolute stop loss price. Example: sl_price=1.08500
tp_price Absolute take profit price. Example: tp_price=1.09500
secret Your Signal Authentication secret key. Required if signal auth is enabled on your account. Example: secret=a1b2c3d4e5...
comment Custom comment attached to the trade in MT5. Example: comment=my_strategy
magic Custom magic number for the trade. Example: magic=12345
betrigger Break-even trigger distance in pips. When price moves this many pips in your favor, the EA moves the stop loss to break-even. Example: betrigger=15

Default Behavior

If no sizing parameter (vol_lots, vol_percent, or vol_dollar) is specified, the system defaults to 1% risk of your account balance.

If no SL/TP is specified, the trade opens without stop loss or take profit levels. You can manage these manually or through your MT5 platform.

Webhook URL

Set your TradingView alert webhook URL to your Synnectra endpoint. The alert message body should contain the PineConnector-formatted signal.

Syntax Examples

Simple Buy

TradingView Alert abc12345,BUY,EURUSD,secret=your_secret_key

Opens a BUY on EURUSD with 1% balance risk (default). Includes the secret key for authentication.

Buy with Fixed Lots and SL/TP in Pips

TradingView Alert abc12345,BUY,GBPUSD,vol_lots=0.5,sl_pips=30,tp_pips=60,secret=your_secret_key

Opens a 0.5 lot BUY on GBPUSD with a 30-pip stop loss and 60-pip take profit.

Sell with Risk Percentage and Pips

TradingView Alert abc12345,SELL,XAUUSD,vol_percent=2,sl_pips=50,tp_pips=100,secret=your_secret_key

Risks 2% of your account balance on a SELL for XAUUSD. The system calculates the exact lot size based on your balance, SL distance, and pip value.

Buy with Dollar Risk

TradingView Alert abc12345,BUY,USDJPY,vol_dollar=100,sl_pips=25,secret=your_secret_key

Risks exactly $100 on this trade. Lot size is calculated from the SL pip distance and pip value.

Absolute SL/TP Prices

TradingView Alert abc12345,BUY,EURUSD,vol_lots=0.1,sl_price=1.08500,tp_price=1.09500,secret=your_secret_key

Uses absolute price levels for stop loss and take profit instead of pip distances.

With Break-Even Trigger

TradingView Alert abc12345,BUY,EURUSD,vol_lots=0.2,sl_pips=20,tp_pips=40,betrigger=10,secret=your_secret_key

When price moves 10 pips in your favor, the EA automatically moves your stop loss to the entry price (break-even).

Close a Position

TradingView Alert abc12345,CLOSE,EURUSD,secret=your_secret_key

Closes the open position on EURUSD.

Close All Positions

TradingView Alert abc12345,CLOSEALL,secret=your_secret_key

Closes all open positions on your account.

With Custom Comment and Magic

TradingView Alert abc12345,BUY,EURUSD,vol_lots=0.1,comment=strat_a,magic=55555,secret=your_secret_key

Attaches a custom comment and magic number for trade identification and strategy tracking.

Pine Script Dynamic Alert Example

Pine Script // Signal in Pine Script if (buyCondition) strategy.entry("Long", strategy.long) // Alert message (set in alert creator): // {{strategy.order.action}} {{ticker}},vol_lots=0.1,sl_pips=20,tp_pips=40,secret=your_secret_key // Or with dynamic values: // abc12345,{{strategy.order.action}},{{ticker}},vol_lots={{strategy.order.contracts}},sl_pips=20,secret=your_secret_key

Position Sizing

Synnectra offers three methods for position sizing. You can specify them directly in the alert message or configure defaults in your dashboard account settings.

1. Fixed Lots (vol_lots)

Trade with an exact lot size regardless of account balance.

LicenseID,BUY,EURUSD,vol_lots=0.25,secret=your_secret_key

2. Percentage Risk (vol_percent)

Risk a percentage of your account balance. When combined with sl_pips, the system calculates the exact lot size so that if your stop loss is hit, you lose exactly that percentage.

LicenseID,BUY,EURUSD,vol_percent=1.5,sl_pips=30,secret=your_secret_key

Calculation: Lot Size = (Balance × Risk%) ÷ (SL Pips × Pip Value)

3. Dollar Risk (vol_dollar)

Risk a fixed dollar amount. Same calculation as percentage but with an absolute dollar value.

LicenseID,BUY,EURUSD,vol_dollar=75,sl_pips=25,secret=your_secret_key

Dashboard Default Sizing

If your alert doesn't specify any sizing parameter, the system uses your dashboard account settings:

If no dashboard sizing is configured either, the system defaults to 1% risk.

Stop Loss & Take Profit

You can set SL and TP using either pip distances or absolute prices.

Pip-Based (Recommended)

Set SL/TP as a number of pips from the entry price. The EA calculates the absolute price at execution time using the live market price.

LicenseID,BUY,EURUSD,sl_pips=20,tp_pips=40,secret=your_secret_key

Aliases: sl_pips = sl, tp_pips = tp

Absolute Price

Set SL/TP as exact price levels.

LicenseID,BUY,EURUSD,sl_price=1.08500,tp_price=1.09500,secret=your_secret_key

Pip-based SL/TP takes priority. If both sl_pips and sl_price are provided, only sl_pips is used.

Signal Authentication

Signal authentication prevents unauthorized trading by requiring a secret key in every alert message. A secret key is automatically generated when you create your account.

How It Works

  1. Your account has a unique webhook secret (visible in the dashboard under Signal Authentication).
  2. Include secret=YOUR_KEY in your TradingView alert message.
  3. Synnectra validates the secret before processing the signal. If it doesn't match, the signal is rejected.

Adding the Secret to Alerts

With Secret LicenseID,BUY,EURUSD,vol_lots=0.1,secret=your_secret_key_here

The secret parameter can appear anywhere after the symbol — order of optional parameters doesn't matter.

Managing Your Secret

EA-Side Validation

When you enter the secret in the EA's Webhook Secret input parameter, the EA also validates the secret locally before executing any trade. This provides a second layer of security.

If signal auth is disabled (no secret configured) and no secret is provided in the alert, the signal is accepted without authentication. Only disable this if you understand the risks.

Symbol Mapping

TradingView and your MT5 broker may use different symbol names. Symbol mapping translates TradingView symbols to your broker's symbols automatically.

Example

TradingView SymbolBroker Symbol (MT5)
EURUSDEURUSDm
XAUUSDXAUUSD.raw
BTCUSDTBTCUSD

Setup

  1. Go to Symbol Mapping in the dashboard sidebar.
  2. Click Add Mapping.
  3. Enter the TradingView symbol and your broker's MT5 symbol.
  4. Optionally set a custom pip value (if your broker uses non-standard pip sizes).

Symbol mapping is applied server-side before the signal reaches your EA. Your TradingView alerts always use the TradingView symbol name.

News Protection

News protection automatically pauses trading around high-impact economic events to protect you from volatile, unpredictable market conditions.

How It Works

Configuration

News protection can be enabled or disabled per account in the dashboard settings. The check interval and buffer time around events are managed by the platform.

Risk Management

Synnectra includes server-side risk management checks that are applied before a signal is forwarded to your EA. These are configured per account in the dashboard.

Available Risk Controls

SettingDescription
Max Open Positions Maximum number of simultaneous open positions. New signals are rejected when the limit is reached. Does not apply to CLOSE or CLOSEALL actions.
Max Positions Per Symbol Maximum number of open positions for a single symbol. Prevents over-concentration on one instrument.
Max Daily Profit Stops opening new trades once your daily profit reaches this dollar amount. Helps lock in gains.
Max Daily Loss (%) Stops opening new trades once your daily loss exceeds this percentage of your start-of-day balance. Protects against drawdowns.

Risk management checks are applied server-side. Signals that violate your limits are rejected with a descriptive error before reaching your EA.

Trading Time Windows

You can restrict trading to specific hours of the day. Signals received outside your configured trading window are automatically rejected.

Use Cases

Configure trading windows per account in the dashboard settings.

Copy Trading

Synnectra supports master-subscriber copy trading. A master account can automatically replicate its trades to one or more subscriber accounts.

How It Works

  1. A signal arrives for the master account and is executed.
  2. Synnectra automatically copies the same trade to all subscriber accounts.
  3. Each subscriber can have its own sizing mode (fixed, percentage, or dollar).

Subscriber Sizing Modes

ModeDescription
FixedUse a fixed lot size for all copied trades
PercentageRisk a percentage of the subscriber's balance
DollarRisk a fixed dollar amount per trade

HMAC Authentication

HMAC authentication secures the communication between your EA and the Synnectra server for heartbeat and trade report API calls.

How It Works

  1. Every request from the EA includes an X-Timestamp header (Unix timestamp) and an X-Signature header (HMAC-SHA256 of the request payload).
  2. The server validates the signature using your webhook secret as the signing key.
  3. Requests with expired timestamps (>5 minutes old) are rejected.

HMAC authentication is handled automatically by the EA. No manual configuration is required beyond setting your Account ID and Webhook Secret in the EA inputs.

Troubleshooting

EA Not Receiving Signals

Signals Rejected — "Invalid webhook secret"

Signals Rejected — "Max open positions reached"

Signals Rejected — "Trading is currently disabled"

Signals Rejected — "Trading paused due to upcoming news event"

Wrong Symbol Executed

Incorrect Lot Size

Frequently Asked Questions

Is signal authentication required?

A secret key is automatically generated when you register. It's strongly recommended to include it in your alerts. If you disable signal auth, anyone who knows your License ID can send trades to your account.

What happens if I don't include a sizing parameter?

The system defaults to risking 1% of your account balance. You can change the default in your dashboard account settings.

Can I use multiple TradingView alerts with the same License ID?

Yes. All alerts sent to your webhook endpoint with the correct License ID (and secret, if enabled) will be processed. The EA handles deduplication within a 5-second window.

Does the EA need to be on a specific chart?

No. The EA subscribes to your signal stream via ZeroMQ using your License ID as a topic filter. It can be attached to any chart — the symbol in the alert message determines which instrument is traded.

What's the execution latency?

Typical end-to-end latency from TradingView webhook to MT5 order execution is under 16ms (server-side). The total latency depends on TradingView's webhook delivery time and your network connection to the broker.

Can I use this with MT4?

The current EA is built for MT5. Contact support if you need MT4 compatibility.

What brokers are supported?

Any broker that supports MT5 is compatible. The EA executes trades through your broker's MT5 server using the standard MQL5 trade API.

Is there a free trial?

Yes. Every new account gets a 14-day free trial with full access to all features. No credit card required.