Signal format

The complete signal syntax. Send these fields from any source, TradingView, Telegram, REST API, and Signalync parses them into a normalized signal.

Overview

Signalync accepts two payload formats: a compact key=value comma-separated string and a standard JSON object. Both are sent to the same inbound endpoint, POST /api/inbound/{sourceAuthKey} , and produce the same normalized signal internally.

The comma-separated format is ideal for TradingView alert messages and Telegram bots because it is short and easy to type. The JSON format is preferred when calling the REST API directly or building custom integrations, since it is explicit and typed. Every parameter available in one format is available in the other. The minimum required fields in either format are symbol and action; everything else is optional.

Case-insensitive

Symbols and actions are case-insensitive. EURUSD, eurusd, and EurUsd are all equivalent.

Quick examples

Basic buy with stop loss and take profit

EURUSD,buy,vol=0.1,sl_pips=50,tp_pips=100
signal

Sell with risk-based sizing and multi-level TP

XAUUSD,sell,vol_pctbal_loss=1,sl_pips=40,tp1_pips=40,tp2_pips=80,tp3_pips=120
signal

Pending buy limit order

EURUSD,buylimit,entry_price=1.0750,vol=0.2,sl_pips=30,tp_pips=90
signal

Trailing stop with breakeven

GBPUSD,sell,vol_dollar=100,sl_pips=40,tp_pips=120,trail_trigger=30,trail_distance=15,be_trigger=20
signal

Same signal as JSON (REST API)

{
  "symbol": "EURUSD",
  "action": "buy",
  "volume": 0.1,
  "volumeType": "lots",
  "sl": 50,
  "slType": "pips",
  "tp": 100,
  "tpType": "pips",
  "comment": "MyStrategy"
}
json

Parameter reference

Every field accepted by the signal parser. Use the comma-separated name in text-format signals and the JSON key when sending JSON.

ParameterTypeRequired?DescriptionExample
symbolstringYesTrading instrument. Case-insensitive.EURUSD
actionstringYesOrder direction or type. See action reference.buy
commentstringNoStrategy label attached to the trade. Used for grouping, filtering close orders, and broker order history.comment=MyStrat
volnumberNoFixed lot size.vol=0.1
vol_lotsnumberNoExplicit fixed lots alias for vol.vol_lots=0.5
vol_pctbalnumberNo% of account balance converted to lots.vol_pctbal=2
vol_pcteqnumberNo% of account equity converted to lots.vol_pcteq=1.5
vol_dollarnumberNoRisk in account currency. Requires a stop loss to calculate lot size.vol_dollar=100
vol_pctbal_lossnumberNo% of balance to risk. Requires a stop loss.vol_pctbal_loss=2
vol_pcteq_lossnumberNo% of equity to risk. Requires a stop loss.vol_pcteq_loss=1
sl_pipsnumberNoStop loss distance in pips from entry.sl_pips=50
sl_pricenumberNoStop loss at an absolute price level.sl_price=1.0800
sl_percentnumberNoStop loss as a % move from entry price.sl_percent=1.5
tp_pipsnumberNoTake profit distance in pips from entry.tp_pips=100
tp_pricenumberNoTake profit at an absolute price level.tp_price=1.1000
tp_percentnumberNoTake profit as a % move from entry price.tp_percent=2
tp1 / tp2 / tp3numberNoMulti-level take profit values. Inherit type from tp1 if suffix is omitted.tp1=50,tp2=100,tp3=150
pct1 / pct2 / pct3numberNoPartial close % at each TP level. Defaults to even distribution if omitted.pct1=50,pct2=30,pct3=20
entry_pipsnumberNoPending order entry distance in pips from current price.entry_pips=50
entry_pricenumberNoPending order entry at an absolute price.entry_price=1.0900
entry_percentnumberNoPending order entry as % from current price.entry_percent=0.5
trail_triggernumberNoActivate trailing after X pips in profit.trail_trigger=30
trail_distancenumberNoTrail SL X pips behind the current price.trail_distance=15
trail_stepnumberNoOnly move the trailing SL when price moves at least X pips.trail_step=5
be_triggernumberNoMove SL to entry after X pips in profit.be_trigger=20
be_offsetnumberNoLock in X pips of profit when moving SL to breakeven.be_offset=2
pctnumberNoClose X% of the open position. Used with close actions.pct=50
pct_lotsnumberNoClose an exact lot amount instead of a percentage.pct_lots=0.5
exopflagNoExit Opposite, close positions in the opposite direction without opening a new one.EURUSD,buy,exop
exentflagNoExit and Enter, close opposite positions then open the new position.EURUSD,buy,exent

Volume types

Seven volume parameters give you full control over position sizing. Only one should be specified per signal.

Fixed lots

vol=0.1 or vol_lots=0.1, trade exactly 0.1 lots regardless of account balance.

EURUSD,buy,vol=0.1,sl_pips=50,tp_pips=100
signal

Percent of balance

vol_pctbal=2, the EA calculates lots such that 2% of account balance is used as nominal position value. No stop loss required.

EURUSD,buy,vol_pctbal=2,tp_pips=80
signal

Risk-based sizing

vol_dollar=100, vol_pctbal_loss=2, and vol_pcteq_loss=1 all compute lot size from the maximum acceptable loss on the trade. All three require a stop loss (sl_pips, sl_price, or sl_percent) so the EA can calculate the distance to the stop.

EURUSD,buy,vol_pctbal_loss=1,sl_pips=30,tp_pips=90
signal

Stop loss required for risk-based sizing

Signals using vol_dollar, vol_pctbal_loss, or vol_pcteq_loss without a stop loss are rejected with SL_REQUIRED.

Stop loss & take profit

Stop loss and take profit can each be specified in three ways, pips, absolute price, or percentage from entry. All six variants (three SL, three TP) can be freely combined.

ParameterMeaningExample
sl_pips=50SL 50 pips from entryEURUSD,buy,sl_pips=50
sl_price=1.0800SL at price 1.0800EURUSD,buy,sl_price=1.0800
sl_percent=1.5SL 1.5% below entryXAUUSD,buy,sl_percent=1.5
tp_pips=100TP 100 pips from entryEURUSD,buy,tp_pips=100
tp_price=1.1000TP at price 1.1000EURUSD,buy,tp_price=1.1000
tp_percent=2TP 2% above entryXAUUSD,buy,tp_percent=2

Multi-level take profit

Use tp1, tp2, tp3 (unlimited levels) to close portions of the position at different targets. The type suffix (_pips, _price) is inherited from tp1 if omitted on subsequent levels.

# All three levels interpreted as pips (type inherited from tp1)
EURUSD,buy,vol_pctbal_loss=2,sl_pips=30,tp1_pips=50,tp2=100,tp3=150,pct1=50,pct2=30,pct3=20
signal

Smart defaults for partial close

If you specify 3 TP levels without corresponding pct values, Signalync distributes them evenly (33 / 33 / 34).

Pending orders

Use a pending order action when you want the broker to place an order at a future price, not the current market price. The four pending actions are buylimit, selllimit, buystop, and sellstop. All four require an entry price.

ActionDescription
buylimitPlace a buy limit order (entry below current price).
selllimitPlace a sell limit order (entry above current price).
buystopPlace a buy stop order (entry above current price).
sellstopPlace a sell stop order (entry below current price).

Entry parameter

Specify where the pending order should be placed using one of the entry parameters:

# Entry at an absolute price
EURUSD,buylimit,entry_price=1.0750,vol=0.2,sl_pips=30,tp_pips=90

# Entry X pips from the current price
GBPUSD,sellstop,entry_pips=40,vol=0.1,sl_pips=25,tp_pips=75
signal

ExOp and ExEnt flags

Two flags modify how existing positions are handled when a new order signal arrives:

  • exop, Exit Opposite. Close any positions in the opposite direction before placing the new order. Does not open the new position if opposite positions existed.
  • exent, Exit and Enter. Close opposite positions then open the new position.
# Close any open longs, then open a buy
EURUSD,buy,vol=0.1,sl_pips=50,tp_pips=100,exent,comment=TrendFollow
signal

Trailing stop & breakeven

Add a trailing stop or breakeven move to any market order by including the relevant parameters. The MT5 EA handles the ongoing management after the order is placed.

Trailing stop

The trailing stop activates once the trade reaches trail_trigger pips in profit, then trails the stop loss trail_distance pips behind the current price. The optional trail_step prevents the stop from moving on every tick, it only shifts when price moves at least trail_step pips.

GBPUSD,sell,vol=0.1,sl_pips=40,tp_pips=120,trail_trigger=30,trail_distance=15,trail_step=5
signal

Breakeven

The breakeven move shifts the stop loss to the entry price (optionally locking in be_offset pips) once the trade reaches be_trigger pips in profit.

EURUSD,buy,vol_pctbal_loss=1,sl_pips=30,tp_pips=90,be_trigger=20,be_offset=2
signal
Trailing stop and breakeven can be combined in the same signal. Breakeven typically fires first (lower pip threshold), after which the trailing stop takes over to lock in further gains.

Partial close

To close part of an open position, use a close action (closebuy, closesell, or closeall) with a pct or pct_lots parameter.

# Close 50% of all open buy positions on XAUUSD
XAUUSD,closebuy,pct=50

# Close exactly 0.5 lots of sell positions, filtered by comment
EURUSD,closesell,pct_lots=0.5,comment=ScalpStrategy
signal

Without a pct or pct_lots parameter, the close action closes the entire position.

Action reference

ActionDescription
buy / longOpen a buy (long) position at market.
sell / shortOpen a sell (short) position at market.
closebuy / closelongClose all open buy positions (optionally filtered by comment).
closesell / closeshortClose all open sell positions (optionally filtered by comment).
closeallClose all open positions (optionally filtered by comment).
closelongbuyClose all long positions, then open a new buy.
closelongsellClose all long positions, then open a new sell.
closeshortbuyClose all short positions, then open a new buy.
closeshortsellClose all short positions, then open a new sell.
buylimitPlace a buy limit pending order. Requires an entry parameter.
selllimitPlace a sell limit pending order. Requires an entry parameter.
buystopPlace a buy stop pending order. Requires an entry parameter.
sellstopPlace a sell stop pending order. Requires an entry parameter.
cancellongCancel all pending buy orders.
cancelshortCancel all pending sell orders.

Authentication

Every inbound request is authenticated by the Source auth key embedded in the URL. An optional HMAC secret adds a second layer of verification via a request header.

  • URL key, POST /api/inbound/{sourceAuthKey}. The auth key is generated when you create a Source and is the primary credential. Keep it private.
  • HMAC secret (optional), If the Source has a secret configured, every request must include an X-Signalync-Secret header. Requests without a matching header are rejected with 401 HMAC_MISMATCH.
The old secret= query parameter is retired. Use the header approach for HMAC verification. Note that TradingView webhooks cannot send custom headers, so HMAC is only useful for REST API or proxied integrations.

Error codes

CodeDescription
PARSE_ERRORSignal payload could not be parsed.
MISSING_SYMBOLNo symbol was provided.
MISSING_ACTIONNo action was provided.
UNKNOWN_ACTIONThe action value is not recognized.
INVALID_VOLUMEVolume is zero, negative, or otherwise invalid.
SL_REQUIREDRisk-based volume sizing was used but no stop loss was provided.
INVALID_SOURCE_KEYThe source auth key in the URL was not found.
HMAC_MISMATCHThe X-Signalync-Secret header did not match the configured secret.
QUOTA_SIGNALS_INMonthly signal ingress limit reached. Upgrade or wait for the quota to reset.
SOURCE_INACTIVEThe Source is currently disabled.