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 Signals → Syntax & Builder, so the two can never disagree.
Learning rather than looking up? Start with Sending messages to Nixora.
Full reference
| Syntax | What it does | How to use | Example |
|---|---|---|---|
| open | Places a new order | + side, a size, optional stop/target | "action":"open" |
| 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" |
| close | Closes everything open on the symbol, long and short (leaves pendings) — the same as closelongshort | "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" |
| 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 |
| 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 |
| 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 | 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" |
{"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 Signals 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.