Command syntax reference
Commands, aliases and examples accepted by the current WebhookIngress parser.
Purpose
This reference lists the command names and aliases accepted by WebhookIngress. It describes TradingView webhook input, not dashboard manual-order input.
Market and pending commands
buyalso acceptslong.sellalso acceptsshort.buystopalso acceptsbuy_stop.buylimitalso acceptsbuy_limit.sellstopalso acceptssell_stop.selllimitalso acceptssell_limit.- A pending command can carry
expiration, its lifetime in minutes (robot 0.0.30 or later): see the webhook format page.
Close, cancel and modification commands
closelongalso acceptsclose_long.closeshortalso acceptsclose_short.closelongshortalso acceptsclose_long_short.cancellongalso acceptscancel_long.cancelshortalso acceptscancel_short.newsltplongalso acceptsnewsltp_long,breakevenlong,breakeven_long,break_even_long.newsltpshortalso acceptsnewsltp_short,breakevenshort,breakeven_short,break_even_short.
Extended commands
Scripts that already use these commands and parameter names run here unchanged. The parameter names sl_pips, sl_price, sl_pct, tp_pips, tp_price, tp_pct, entry_pips, entry_price and vol_lots are translated automatically, and every command below also accepts its underscored form (close_all, newsltp_buy_stop, ...). One exception: an alert that mixes price units (sl_pips with tp_price, for example) is now refused.
- Exit then enter, in one alert:
closelongopenlong,closelongopenshort,closeshortopenlong,closeshortopenshort,closelongshortopenlong,closelongshortopenshort,cancellongbuystop,cancellongbuylimit,cancelshortsellstop,cancelshortselllimit. - Flatten everything:
closeallcloses every position and deletes every pending order, on all symbols.closealleaoffdoes the same, then pauses the robot. - Partial close:
closelongpct,closeshortpct. The share comes from the account setting Partial close (%) — these alerts do not carry it. Avolumein the alert still wins. - SL/TP on a pending order:
newsltpbuystop,newsltpbuylimit,newsltpsellstop,newsltpselllimit. They never move the order's entry price. - Pause / resume from an alert:
eaoff,eaon. Scope is the whole account. - Trailing on a single position:
trailingoff,trailingon, carrying the order'sticket. The stop already in place does not move; the robot simply stops following it. - Sizing written in the alert:
vol_dollar(amount risked, in account currency),vol_pct_bal_loss(% of balance),vol_pct_eq_loss(% of equity),vol_pct_bal_margin(% of balance used as margin — an exposure limit, which ignores the stop distance). The alert wins over the account's risk settings. - Protection written in the alert:
spreadcaps the spread accepted at entry, in pips.betrigger/beoffsetmove the stop to break-even;trailtrig/traildist/trailsteptrail it — all five in pips, on that position only.atrtimeframe/atrperiod/atrmultiplier/atrshift/atrtriggertrail at a multiple of the ATR instead. These work even when the account's own trailing is off. - Robot version: sizing and protection per alert need robot 0.0.21 or later. Older robots ignore them and play the alert with the account's settings.
Several strategies on the same symbol
Two strategies trading the same pair live on one account, so an untagged closelong closes the first long it finds — possibly the other strategy's. Name each strategy with tag (alias comment) to keep them apart: on entry the robot stamps that name into the position's broker comment, and a named close only touches the positions carrying it.
- Put the same name in every alert of a strategy, entries and exits alike. A close whose name never appeared on an entry closes nothing.
- Names are lowercased and cut to 12 characters; anything other than letters, digits,
-and_is dropped.Strat Aandstrataare therefore the same name — pick short, distinct ones. - A named close needs robot 0.0.21 or later. On an older robot the alert is refused rather than played on another strategy's position.
- The name follows replication: the positions replicated on a Target carry the name of the Source.
- Do not send your own
streamIdalongside a name — it replaces the generated one, and the name then never reaches the position comment. - Without a name nothing changes: a close still takes the first position in the requested direction.
Entry alert of the trend strategy:
{"action":"buy","symbol":"USDJPY","risk":1,"tag":"trend"}
Its exit alert, which leaves the other strategy alone:
{"action":"closelong","symbol":"USDJPY","tag":"trend"}
Market example
{
"action": "buy",
"symbol": "EURUSD",
"risk": 1,
"sl": 0.2,
"tp": 0.4,
"priceMode": "percent"
}
priceMode gives the unit of sl, tp and price in the alert itself: price, pips or percent. Here the stop is 0.2% from the entry and the target 0.4%, whatever the account's price mode; without priceMode, the account's price mode applies.
Pending example
{
"action": "buystop",
"symbol": "EURUSD",
"price": 1.0875,
"risk": 1,
"sl": 1.0840,
"tp": 1.0940,
"priceMode": "price"
}
Close or modify example
{
"action": "closelong",
"symbol": "EURUSD",
"ticket": "123456789"
}
Parser notes
- Put the access key in the TradingView Webhook URL:
https://webhook.theconnector.fr/YOUR_ACCESS_KEY. riskis numeric; exact lots are sent withvolume,lot,lotsorfixedVolume.priceis required only for pending orders.ttl_msis not read by the current parser. Each price keeps the unit it is written in — a suffix (sl_pips,tp_price…) for that value only, otherwisepriceMode, otherwise the account price mode — and an alert whose prices need two units (sl_pipswithtp_price, for example) is refused, never sent without its stop-loss or take-profit: put a suffix on every price, or on none.- A late command expires; it is not replayed.