Keyword reference
Every action word and parameter in one place, with what it does, how to use it and a worked example.
Every keyword and parameter, with what it does, how to use it, and a worked example. This is the same reference the app shows under Auto Trading → Syntax & Builder, so the two can never disagree.
Learning rather than looking up? Start with Sending messages to Nixora.
Full reference
| Broker | Accepts | Refused with a reason |
|---|---|---|
| MT5 · MT4 | Everything below, in JSON or comma format | comment on a close or cancel; in comma format, old risk=, sl=, tp=; pending= in any format |
| NixoraPaper | The same commands, in JSON or comma format. Nets one position per symbol. Sizes: vol_lots, vol_pct_eq_loss. Comma-format pips are refused | ATR, trailstep, accfilter, breakeven now, vol_dollar, vol_pct_bal_loss, vol_pct_bal_margin, tickets |
| Alpaca | Opening, closing, cancelling, reversing, changing stops, all sizes, spread, accfilter, in JSON or comma format. Sizes are whole shares for risk-based sizing. 1 pip is $0.01 in JSON, $0.10 in comma format | Breakeven and trailing after entry, ATR, eaon (arm it in the app), tickets |
| Binance | JSON only. buy sell long short bull bear, open with side, buylimit, selllimit, close, closelong, closeshort, closelongshort. Needs qty (contract quantity), a stop and a target as prices, and the alert's time (add an id too, to name the alert) | Partial closes, changing stops, cancelling, reversing, closeall, stop entries, lots, risk sizes, pips and %, spread, accfilter, trailing |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| open | Places a new order | + side, a size, optional stop/target | "action":"open" |
| buy · long · bull · bullish | Market buy | + symbol, a size — no side needed | "action":"buy","symbol":"EURUSD","vol_lots":0.10 |
| sell · short · bear · bearish | Market sell | + symbol, a size | "action":"sell","symbol":"EURUSD","vol_lots":0.10 |
| buylimit · buystop · selllimit · sellstop | Pending order | + symbol, a size, price or entry_price, or an offset | "action":"buylimit","symbol":"EURUSD","vol_lots":0.10,"entry_price":1.08 |
| closelong | Closes all longs on the symbol | + symbol — no ticket | "action":"closelong","symbol":"EURUSD" |
| closeshort | Closes all shorts on the symbol | + symbol | "action":"closeshort","symbol":"EURUSD" |
| closeall | Closes everything on the symbol (both sides) | + symbol | "action":"closeall","symbol":"EURUSD" |
| closeall + scope | Closes every position and cancels every pending order on all symbols, and keeps running. In comma format, closeall always means this. Needs the new EA | + "scope":"account" | "action":"closeall","scope":"account" |
| close | Closes everything open on the symbol, long and short (leaves pendings) — the same as closelongshort | + symbol | "action":"close","symbol":"{{ticker}}" |
| closelongshort | Closes both directions' positions (leaves pendings) | + symbol | "action":"closelongshort","symbol":"EURUSD" |
| closelongpct / closeshortpct | Partial close — % of each position | + symbol + close_pct (1-100) | "action":"closelongpct","symbol":"EURUSD","close_pct":50 |
| closelongvol / closeshortvol | Partial close — a lot amount off the direction | + symbol + close_lots | "action":"closelongvol","symbol":"EURUSD","close_lots":0.20 |
| cancellong | Cancels all pending buy orders on the symbol | + symbol | "action":"cancellong","symbol":"EURUSD" |
| cancelshort | Cancels all pending sell orders on the symbol | + symbol | "action":"cancelshort","symbol":"EURUSD" |
| cancellongbuylimit · cancellongbuystop · cancelshortselllimit · cancelshortsellstop | Cancels the pending orders on that side, then places a new one, in one message | + symbol, a size, a price or offset | "action":"cancellongbuylimit","symbol":"EURUSD","vol_lots":0.10,"entry_pips":50 |
| modifylong | Sets SL/TP on all open longs on the symbol | + symbol + a stop/target (any unit) | "action":"modifylong","symbol":"EURUSD","sl_price":1.08 |
| modifyshort | Sets SL/TP on all open shorts on the symbol | + symbol + a stop/target | "action":"modifyshort","symbol":"EURUSD","tp_pips":30 |
| newsltplong · newsltpshort | The PineConnector names for modifylong and modifyshort | + symbol + a stop/target | "action":"newsltplong","symbol":"EURUSD","sl_price":1.08 |
| be_now (or sl = 0) | Moves the stop to the entry price now. Needs the new EA | on modifylong or modifyshort; on MT5 and MT4 also on a partial close | "action":"modifylong","symbol":"EURUSD","be_now":1 |
| newsltpbuystop · newsltpbuylimit · newsltpsellstop · newsltpselllimit | Sets SL/TP on pending orders of that type | + symbol + a stop/target | "action":"newsltpbuylimit","symbol":"EURUSD","sl_pips":20 |
| alert | Logs the message, never trades | any text / JSON | "action":"alert" |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| closelongopenshort | Close longs, then open a short | + symbol + a size (like an open) | "action":"closelongopenshort","symbol":"EURUSD","vol_lots":0.10 |
| closeshortopenlong | Close shorts, then open a long | + symbol + a size | "action":"closeshortopenlong","symbol":"EURUSD","vol_pct_eq_loss":1,"sl_pips":20 |
| closelongopenlong · closeshortopenshort | Re-enter the same side (close then re-open) | + symbol + a size | "action":"closelongopenlong","symbol":"EURUSD","vol_lots":0.10 |
| closelongshortopenlong · closelongshortopenshort | Flatten both sides, then open one | + symbol + a size | "action":"closelongshortopenlong","symbol":"EURUSD","vol_lots":0.10 |
Shorthands also work: CL+OS, CS+OL, CL+OL, CS+OS, CLS+OL, CLS+OS. The open is always a market order; the direction is set by the command name (no side needed).
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| eaoff | Halts new trades (flips Auto-execution OFF) | no symbol needed | "action":"eaoff" |
| eaon | Resumes trading (flips Auto-execution ON) | no symbol | "action":"eaon" |
| closealleaoff | Panic — closes ALL account positions, then halts | no symbol | "action":"closealleaoff" |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| vol_lots | Fixed lot size | any open | "vol_lots":0.10 |
| vol_dollar | Risk a fixed $ amount | needs a stop; EA computes the lots | "vol_dollar":50 |
| vol_pct_eq_loss | Risk % of account equity | needs a stop | "vol_pct_eq_loss":1 |
| vol_pct_bal_loss | Risk % of account balance | needs a stop | "vol_pct_bal_loss":1 |
| vol_pct_bal_margin | Size so margin = % of balance | no stop needed | "vol_pct_bal_margin":5 |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| sl_pips / sl_price / sl_pct | Stop loss — in pips, exact price, or % | pick one unit | "sl_pips":20 |
| tp_pips / tp_price / tp_pct | Take profit — pips, price, or % | pick one unit | "tp_pips":60 |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| betrigger + beoffset | Move stop to breakeven after X pips profit | pips | "betrigger":10,"beoffset":1 |
| trailtrig + traildist + trailstep | Trail the stop behind price (fixed pips) | pips | "trailtrig":15,"traildist":10,"trailstep":3 |
| atrtimeframe + atrperiod + atrmultiplier + atrtrigger | Trail the stop by ATR (distance = ATR × mult) | tf string + numbers; trigger in pips (0 = at once) | "atrtimeframe":"60","atrperiod":14,"atrmultiplier":2 |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| entry_pips / entry_pct | Pending entry as an offset from market | instead of price; limit below / stop above | "orderType":"limit","entry_pips":10 |
| spread | Skip the open if spread is wider than this | pips | "spread":2 |
| accfilter | Skip the open if the account is below this value. Needs the new EA on MT5 and MT4 | the EA's AccountFilterBasis input picks the figure; Alpaca compares equity | "accfilter":1000 |
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| symbol | The instrument | use {{ticker}} — TradingView fills it | "symbol":"{{ticker}}" |
| side | Direction for an open | buy or sell | "side":"buy" |
| orderType | Entry type | market / limit / stop | "orderType":"limit" |
| price · entry_price | Entry price | limit / stop orders only | "price":1.0820 |
| id | De-dupe key | recognises a retry of the same alert; keep it under 28 characters | "id":"{{ticker}}-{{time}}" |
| ref | Free label (shows in the Journal) | optional | "ref":"london-fvg" |
Send command,symbol,field=value to the same webhook address. A license ID in front still works and is ignored, because the address identifies you. On MT5 and MT4, pip fields in this format mean 1 pip = 10 points on every symbol and need the new EA. In JSON, a pip stays 1 point on 2-digit symbols. Old risk=, sl=, tp= and pending= are refused, because their meaning depended on PineConnector's EA settings. sl=0 means breakeven now.
buy,EURUSD,vol_lots=0.10,sl_price=1.08,tp_price=1.12
{"action":"open","symbol":"{{ticker}}","side":"buy","vol_lots":0.10,"sl_pips":20,"tp_pips":60,"id":"{{ticker}}-{{time}}"}
{"action":"open","symbol":"{{ticker}}","side":"buy","vol_pct_eq_loss":1,"sl_pips":20,"betrigger":10,"beoffset":1,"trailtrig":15,"traildist":10,"trailstep":3,"id":"{{ticker}}-{{time}}"}
{"action":"open","symbol":"{{ticker}}","side":"buy","orderType":"limit","price":1.0820,"vol_lots":0.10,"sl_pips":25}
closeshort / closeall too):{"action":"closelong","symbol":"{{ticker}}"}
{"action":"modifylong","symbol":"{{ticker}}","sl_price":{{close}}}
{"action":"cancellong","symbol":"{{ticker}}"}
{"action":"closelongpct","symbol":"{{ticker}}","close_pct":50}
{"action":"closelongopenshort","symbol":"{{ticker}}","vol_pct_eq_loss":1,"sl_pips":20}
{"action":"closealleaoff"}
Attach a message to each entry/exit line in your Pine strategy, then set the alert's Message to just {{strategy.order.alert_message}} — each order sends its own JSON:
strategy.entry("Long", strategy.long,
alert_message='{"action":"open","symbol":"{{ticker}}","side":"buy","vol_pct_eq_loss":1,"sl_pips":20}')
strategy.close("Long",
alert_message='{"action":"closelong","symbol":"{{ticker}}"}')
• Real accounts: Auto Trading trade a real account when
AllowLiveAccount=true and EnableWebhookExecution=true in the EA — both ship ON, so a freshly attached EA with a valid token will place REAL orders. Set them to false in the EA inputs if you want shadow-only.•
{{ticker}} / {{close}} / {{strategy.order.action}} are TradingView placeholders — it fills them when the alert fires.• Exchange prefixes are stripped (
OANDA:EURUSD → EURUSD); set the EA's SymbolSuffix/Prefix if your broker uses one (e.g. EURUSD.r).• Add a short unique
"id", under 28 characters, using only letters, digits and _ . : -. Retries using the same immutable command ID are deduplicated within the supported retention window. Without an explicit ID, duplicate protection may cover only alerts received in the same clock second. Always send a short unique ID.
A note on units
Several parameters accept the same idea in different units — a stop can be sl_pips, sl_price or
sl_pct. Pick whichever your strategy already computes; there is no advantage to one over another
except that pips and percentages travel across accounts and instruments, and absolute prices do
not. If one alert feeds several accounts, prefer the relative form.
Duplicate protection: id
The id you put in a message is the identity of that command. Retries using the same immutable command id are
deduplicated within the supported retention window; this is retry deduplication, not an absolute exactly-once
promise. On a NixoraPaper account the same id is
a duplicate for 30 days from when its record was last stamped (the window is [at, at + 30 days)), and the
reply is the original result marked duplicate: true. After the record has been retired, the same id is a
new command. On a NixoraPaper account a message with no id is matched on its exact body for 15 seconds only.
On live accounts the rule is different. Without an explicit ID, duplicate protection may cover only alerts received in the same clock second. Always send a short unique ID.
Keep the id under 28 characters and use only letters, digits and _ . : -. A longer id can be cut short on some
secondary MetaTrader connections, which can make two different long ids collide. To repeat an action on
purpose, send a new id. The exact rule, including re-stamping and retirement, is in
Retries, duplicates and command ids.
Where these are accepted
The parameters above are the vocabulary of your account address. A strategy or subscription address speaks a smaller set of verbs with the detail moved into fields — that difference, and the table of what each address may send, is in How alerts are routed.