Skip to main content

Reference

Signal Syntax

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


Signal Syntax

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

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:

Actions

Open Commands

Action Description
BUY Open buy market order
SELL Open sell market order
BUYLIMIT Place buy limit order (requires PRICE) — automation not yet on futures
SELLLIMIT Place sell limit order (requires PRICE) — automation not yet on futures
BUYSTOP Place buy stop order (requires PRICE) — automation not yet on futures
SELLSTOP Place sell stop order (requires PRICE) — automation not yet on futures
BRACKET Open position with SL+TP as bracket orders (futures: OSO, forex: like BUY/SELL)

Bracket Management (Futures: Tradovate/NinjaTrader)

Action Description
REMOVE_SL Remove the SL bracket order from a position
REMOVE_TP Remove the TP bracket order from a position

Management Commands

Action Aliases
MODIFY MODIFYORDER
CLOSE CLOSEORDER
CLOSEALL CLOSEALLORDERS
BREAKEVEN BE
CANCEL CANCELORDER, DELETE, DELETEORDER
LAYER_CLOSE LAYERCLOSE, LAYER

Parameters

Parameter Description Example Required For
VOL or VOLUME Lot size VOL=0.1 Open orders (or use RISK)
RISK Risk % of balance RISK=1 Open orders (or use VOL)
SL Stop Loss SL=50 (pips) or SL=1.0800 (price) Optional
TP Take Profit TP=100 (pips) or TP=1.0950 (price) Optional
TPSLTYPE Interpret SL/TP as pips, ticks, or price TPSLTYPE=PIPS, TPSLTYPE=TICKS, or TPSLTYPE=PRICE Optional (default: PRICE)
PRICE Entry price PRICE=1.0800 Pending orders
MAGIC Magic number MAGIC=12345 Optional
COMMENT Order comment COMMENT=Strategy1 Optional
TICKET Ticket number TICKET=12345 MODIFY, CLOSE, BREAKEVEN, CANCEL
PERCENT Percentage to close PERCENT=50 Partial close (CLOSE action)
SIDE or DIRECTION Direction filter SIDE=BUY CLOSE, BREAKEVEN, CANCEL, LAYER_CLOSE
OFFSET Breakeven offset OFFSET=0.0010 BREAKEVEN
POSITIVE Close only profitable trades POSITIVE=true CLOSEALL
NEGATIVE Close only losing trades NEGATIVE=true CLOSEALL
PENDING Close only pending orders PENDING=true CLOSEALL
POSITIONS Close only open positions POSITIONS=true CLOSEALL

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.

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.

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)

CLOSEALL

Closes all positions on the symbol with optional filters:

BREAKEVEN

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

CANCEL

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

LAYER_CLOSE

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

BRACKET

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

REMOVE_SL / REMOVE_TP

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

Multi-Command Signals

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

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

Error Cause Fix
“No command found” Missing action keyword Add BUY, SELL, CLOSE, etc.
“No symbol found” Missing symbol Add symbol: EURUSD, XAUUSD, etc.
“Multiple commands found” Two actions in one signal Use semicolons for multi-command
“Multiple symbols found” Two symbols in one signal Only one symbol per command
“Volume or RISK is required” Open order without sizing Add VOL=0.1 or RISK=1
“At least one of SL or TP is required” MODIFY without changes Add SL= or TP=
“Invalid percent” PERCENT not in 0-100 range Use value between 1 and 99 for partial
“VOL is required for LAYER_CLOSE” Layer close without volume Add VOL=0.05
“Invalid VOL” VOL is zero or negative Use a positive value