Search documentation

Search every page of the Trade Wzrd docs

Reference

Signal Syntax

Complete reference for the Trade Wzrd signal format - all actions, parameters, flexible ordering, and multi-command support.

Trade Wzrd parses plain-text commands into structured trading signals. The format is fully flexible - command, symbol, and parameters can appear in any order.

General Format

text
COMMAND,SYMBOL,PARAM=VALUE,PARAM=VALUE,...

Parts are separated by commas. Parameters use KEY=VALUE format. The parser identifies the command and symbol automatically regardless of their position.

Flexible Ordering Examples

All of these are equivalent:

text
BUY,EURUSD,VOL=0.01,SL=100,TP=200EURUSD,BUY,VOL=0.01,SL=100,TP=200VOL=0.01,BUY,EURUSD,SL=100,TP=200SL=100,VOL=0.01,EURUSD,BUY

Actions

Open Commands

ActionDescription
BUYOpen buy market order
SELLOpen sell market order
BUYLIMITPlace buy limit order (requires PRICE) - automation not yet on futures
SELLLIMITPlace sell limit order (requires PRICE) - automation not yet on futures
BUYSTOPPlace buy stop order (requires PRICE) - automation not yet on futures
SELLSTOPPlace sell stop order (requires PRICE) - automation not yet on futures
BRACKETOpen position with SL+TP as bracket orders (futures: OSO, forex: like BUY/SELL)

Bracket Management (Futures: Tradovate/NinjaTrader/Rithmic)

ActionDescription
REMOVE_SLRemove the SL bracket order from a position
REMOVE_TPRemove the TP bracket order from a position

Management Commands

ActionAliases
MODIFYMODIFYORDER
CLOSECLOSEORDER
CLOSEALLCLOSEALLORDERS
BREAKEVENBE
CANCELCANCELORDER, DELETE, DELETEORDER
LAYER_CLOSELAYERCLOSE, LAYER

Parameters

ParameterDescriptionExampleRequired For
VOL or VOLUMELot sizeVOL=0.1Open orders (or use RISK)
RISKRisk % of balanceRISK=1Open orders (or use VOL)
SLStop LossSL=50 (pips) or SL=1.0800 (price)Optional
TPTake ProfitTP=100 (pips) or TP=1.0950 (price)Optional
TPSLTYPEInterpret SL/TP as pips, ticks, or priceTPSLTYPE=PIPS, TPSLTYPE=TICKS, or TPSLTYPE=PRICEOptional (default: PRICE)
PRICEEntry pricePRICE=1.0800Pending orders
MAGICMagic numberMAGIC=12345Optional
COMMENTOrder commentCOMMENT=Strategy1Optional
TICKETTicket numberTICKET=12345MODIFY, CLOSE, BREAKEVEN, CANCEL
PERCENTPercentage to closePERCENT=50Partial close (CLOSE action)
SIDE or DIRECTIONDirection filterSIDE=BUYCLOSE, BREAKEVEN, CANCEL, LAYER_CLOSE
OFFSETBreakeven offsetOFFSET=0.0010BREAKEVEN
POSITIVEClose only profitable tradesPOSITIVE=trueCLOSEALL
NEGATIVEClose only losing tradesNEGATIVE=trueCLOSEALL
PENDINGClose only pending ordersPENDING=trueCLOSEALL
POSITIONSClose only open positionsPOSITIONS=trueCLOSEALL

Default Behaviors

  • TPSLTYPE defaults to PRICE - if you want to use pip values for SL/TP, explicitly set TPSLTYPE=PIPS (forex) or TPSLTYPE=TICKS (futures)
  • VOL or RISK is required for all open commands - at least one must be provided
  • PRICE is required for pending orders (BUYLIMIT, SELLLIMIT, BUYSTOP, SELLSTOP)

Action Details

Open (BUY / SELL)

Requires at least one of VOL/VOLUME or RISK. If both are provided, both are used.

text
BUY,EURUSD,VOL=0.01,SL=100,TP=200,TPSLTYPE=PIPSSELL,GBPUSD,RISK=2,SL=1.2500,TP=1.2300BUYLIMIT,EURUSD,VOL=0.1,PRICE=1.0800,SL=50,TP=100BRACKET,ES,VOL=2,SL=4,TP=10,TPSLTYPE=TICKS

MODIFY

Requires at least one of SL or TP. Use TICKET to target a specific position, or MAGIC to target positions with a specific magic number.

text
MODIFY,EURUSD,SL=1.0850,TICKET=12345MODIFY,EURUSD,SL=60,TP=120,TPSLTYPE=PIPSMODIFY,EURUSD,MAGIC=12345,TP=1.1000

CLOSE

Closes positions matching the symbol. Behavior depends on additional parameters:

  • No extra params - full close of all positions on the symbol
  • TICKET=12345 - close specific position
  • MAGIC=12345 - close positions with that magic number
  • PERCENT=50 - partial close (50% of position)
  • PERCENT=100 - full close (equivalent to no percent)
  • VOL=0.05 - close by volume (mapped to LAYER_CLOSE action)
  • SIDE=BUY - close only buy positions (or SELL for sell only)
text
CLOSE,EURUSDCLOSE,EURUSD,TICKET=12345CLOSE,EURUSD,PERCENT=50CLOSE,EURUSD,VOL=0.05CLOSE,EURUSD,SIDE=BUY

CLOSEALL

Closes all positions on the symbol with optional filters:

text
CLOSEALL,EURUSDCLOSEALL,EURUSD,POSITIVE=trueCLOSEALL,EURUSD,NEGATIVE=trueCLOSEALL,EURUSD,PENDING=trueCLOSEALL,EURUSD,POSITIONS=true

BREAKEVEN

Moves stop loss to the entry price with an optional offset:

text
BREAKEVEN,EURUSDBREAKEVEN,EURUSD,OFFSET=0.0010BREAKEVEN,EURUSD,TICKET=12345,OFFSET=0.0010BE,EURUSD,SIDE=BUY

CANCEL

Cancels pending orders. Accepts TICKET, MAGIC, and SIDE/DIRECTION filter:

text
CANCEL,EURUSD,TICKET=67890CANCEL,EURUSD,MAGIC=12345DELETE,EURUSD,SIDE=BUY

LAYER_CLOSE

Closes multiple trades to match a target volume. Requires VOL/VOLUME (must be > 0):

text
LAYER_CLOSE,EURUSD,VOL=0.05LAYERCLOSE,EURUSD,VOL=0.1,SIDE=BUYLAYER,EURUSD,VOL=0.03

BRACKET

Open a position with SL+TP as bracket orders (OSO). On forex, behaves like BUY/SELL with SL/TP. On futures (Tradovate/NinjaTrader/Rithmic), SL/TP are placed as separate bracket orders:

text
BRACKET,ES,VOL=2,SL=4,TP=10,TPSLTYPE=TICKSBRACKET,NQ,VOL=1,SL=8,TP=20,TPSLTYPE=TICKS

REMOVE_SL / REMOVE_TP

Remove individual bracket orders from a futures position (Tradovate/NinjaTrader/Rithmic only):

text
REMOVE_SL,ESREMOVE_TP,ESREMOVE_SL,ES;REMOVE_TP,ES

Multi-Command Signals

Use semicolons to send multiple commands in a single webhook call:

text
CLOSE,XAUUSD;BUY,EURUSD,VOL=0.01,SL=100,TP=200CLOSE,XAUUSD;SELL,EURUSD,VOL=0.01

Each command is parsed and executed independently. Empty segments (from ;;) are ignored. If any command fails, the error message includes the command index.

Symbol Matching

When a signal symbol doesn't exactly match your broker's symbol, Trade Wzrd attempts to find the closest match using this priority:

  1. Exact match (case-insensitive) - BTCUSD matches btcusd
  2. Prefix match - BTCUSD matches BTCUSDm (shortest match wins)
  3. Reverse prefix - BTCUSDm matches BTCUSD
  4. Contains - BTCUSD matches XBTCUSD

If no match is found, the signal fails with a symbol not found error.

Common Errors

ErrorCauseFix
"No command found"Missing action keywordAdd BUY, SELL, CLOSE, etc.
"No symbol found"Missing symbolAdd symbol: EURUSD, XAUUSD, etc.
"Multiple commands found"Two actions in one signalUse semicolons for multi-command
"Multiple symbols found"Two symbols in one signalOnly one symbol per command
"Volume or RISK is required"Open order without sizingAdd VOL=0.1 or RISK=1
"At least one of SL or TP is required"MODIFY without changesAdd SL= or TP=
"Invalid percent"PERCENT not in 0-100 rangeUse value between 1 and 99 for partial
"VOL is required for LAYER_CLOSE"Layer close without volumeAdd VOL=0.05
"Invalid VOL"VOL is zero or negativeUse a positive value