PineConnector Compatibility Mode
Run your existing PineConnector alerts on PineHook unchanged. Full command and parameter reference.
PineConnector Compatibility Mode makes PineHook read PineConnector's alert syntax directly. Your existing TradingView alerts keep working: same commands, same parameters, same spellings.
Migrating in three steps#
- Change the license ID in your alert messages to your PineHook license key.
- Point the webhook at PineHook's endpoint.
- Set the EA input Signal Syntax Mode to PineConnector Compatibility, then let the EA reconnect.
Nothing else in your alerts changes.
Your EA settings come with you
PineConnector's risk=, sl=, tp= and pending= carry no units of their own, because their meaning comes from EA settings. PineHook mirrors those settings under PineConnector Syntax, so set them to match what you had and your alert values keep their meaning.
Enabling the mode#
Under Syntax Compatibility:
| Input | Set to |
|---|---|
| Signal Syntax Mode | PineConnector Compatibility |
Then, under PineConnector Syntax, match your old configuration:
| Input | Controls | Options |
|---|---|---|
risk= means | how risk= is sized | Lots · Dollar Amount · % Balance Lots · % Balance Margin · % Balance Loss · % Equity Loss |
sl= / tp= mean | how targets are read | Pips · Price · Percentage |
pending= means | pending order entry | Pips from market · Specified price · Percentage from market |
accfilter= checks | which account metric | Balance · Equity · Free Margin · Margin Level % |
closelongpct closes | partial close size | 10% · 20% · 25% · 34% · 50% |
These are only read in PineConnector mode
In Default Mode these inputs are inert and are not sent to the server. That is deliberate: a stale settings object could otherwise change how a later alert's numbers are interpreted.
Commands#
Every command below works exactly as it does on PineConnector.
Market orders#
| Command | Does |
|---|---|
buy · long · bull · bullish | Opens a long at market |
sell · short · bear · bearish | Opens a short at market |
LICENSE,buy,EURUSD,risk=1,sl=50,tp=100
LICENSE,long,EURUSD,risk=1,sl=50
Pending orders#
| Command | Does |
|---|---|
buystop | Buy above the market |
buylimit | Buy below the market |
sellstop | Sell below the market |
selllimit | Sell above the market |
LICENSE,buystop,EURUSD,risk=1,pending=20
The pending= value is read through your Pending Order Entry Type setting, which can be pips from the market, an absolute price, or a percentage.
Closing positions#
| Command | Does |
|---|---|
closelong | Closes all buy positions for the symbol |
closeshort | Closes all sell positions for the symbol |
closelongshort | Closes both sides for the symbol |
closelongpct · closeshortpct | Closes the percentage set in your EA |
closelongvol · closeshortvol | Closes the lots given in risk= |
closeall | Closes all positions and cancels all pending orders, on every symbol |
closealleaoff | Same as closeall, then halts the EA |
closeall is global
In PineConnector compatibility mode, closeall is account-wide: it closes every position and cancels every pending order, on every symbol. The symbol in the alert is treated as a placeholder, not a filter, so LICENSE,closeall,EURUSD does not stop at EURUSD.
To close a single symbol, use closelongshort instead.
Verify this on a demo account before pointing live alerts at it. This is the widest-reaching command in compatibility mode, and if your PineConnector setup scoped closeall to one symbol, the same alert will flatten your whole account here.
LICENSE,closelongpct,EURUSD
LICENSE,closelongvol,EURUSD,risk=0.5
LICENSE,closeall,EURUSD
closelongvol requires risk=
risk= is how many lots to close. Without it the command would close the entire position, so PineHook rejects it rather than closing more than you asked for.
Cancelling pending orders#
| Command | Does |
|---|---|
cancellong | Cancels buy-side pending orders |
cancelshort | Cancels sell-side pending orders |
Close and open in one alert#
| Command | Short form | Does |
|---|---|---|
closelongopenlong | CL+OL | Close longs, then open a long |
closelongopenshort | CL+OS | Close longs, then open a short |
closeshortopenlong | CS+OL | Close shorts, then open a long |
closeshortopenshort | CS+OS | Close shorts, then open a short |
closelongshortopenlong | CLS+OL | Close both sides, then open a long |
closelongshortopenshort | CLS+OS | Close both sides, then open a short |
The older names closelongbuy and closeshortsell also work.
LICENSE,closelongopenshort,EURUSD,risk=1,sl=50
LICENSE,CL+OS,EURUSD,risk=1,sl=50
The close always runs first
If nothing can be closed, no new position is opened, because reversing while the original exposure is still live would double it. A partial close still proceeds and is reported as a warning.
Cancel and replace#
| Command | Does |
|---|---|
cancellongbuystop | Cancels buy pendings, places a new Buy Stop |
cancellongbuylimit | Cancels buy pendings, places a new Buy Limit |
cancelshortsellstop | Cancels sell pendings, places a new Sell Stop |
cancelshortselllimit | Cancels sell pendings, places a new Sell Limit |
Modifying stops and targets#
| Command | Does |
|---|---|
newsltplong · newsltpshort | Changes SL/TP on open positions of that side |
newsltpbuystop · newsltpbuylimit | Changes SL/TP on those pending orders |
newsltpsellstop · newsltpselllimit | Changes SL/TP on those pending orders |
EA control#
| Command | Does |
|---|---|
eaon | Resumes the EA |
eaoff | Halts the EA |
PineConnector's padded form is accepted:
LICENSE,eaoff,eaoff
sl=0 moves the stop to breakeven#
On PineConnector, sl=0 does not remove a stop; it moves it to your entry price. PineHook reproduces that.
| Alert | Result |
|---|---|
newsltplong,sl=0 | Moves the stop to entry on your long positions |
newsltpshort,sl=0 | Same for shorts |
closelongpct,sl=0 | Closes the configured percentage, then moves the remaining position's stop to entry |
closelongvol,risk=0.5,sl=0 | Closes 0.5 lots, then moves the remainder's stop to entry |
LICENSE,newsltplong,EURUSD,sl=0
LICENSE,closelongpct,EURUSD,sl=0
As on PineConnector, the position must be far enough in profit for the broker to accept a stop at entry. If it is not, the close still happens and PineHook tells you the stop was not moved, in the Experts tab and in your Signal Logs, rather than leaving you to assume it was.
Why this one matters
In PineHook's own syntax a stop price of zero means remove the stop. Sending sl=0 to a license running in Default Mode is rejected rather than guessed at, because guessing wrong here would delete the protection you were trying to add.
sl=0 is refused in two cases, both because there is nothing to act on: on the newsltp commands that target pending orders (nothing is open yet), and alongside a tp= change (a breakeven carries no take-profit, and silently dropping half your request would be worse than telling you).
Parameters#
Sizing#
| Parameter | Meaning |
|---|---|
risk= | Read through your Volume Type setting |
vol_lots= | Fixed lot size |
vol_dollar= | Cash amount risked to the stop |
vol_pct_bal_loss= | Percentage of balance risked |
vol_pct_eq_loss= | Percentage of equity risked |
vol_pct_bal_margin= | Percentage of balance committed as margin |
The loss-based options need a stop loss, because without one there is no risk distance to size against.
Stops and targets#
| Parameter | Meaning |
|---|---|
sl= · tp= | Read through your Target Type setting |
sl_pips= · tp_pips= | Distance in pips |
sl_price= · tp_price= | Absolute price |
sl_pct= · tp_pct= | Percentage from entry |
Pending entry#
| Parameter | Meaning |
|---|---|
pending= · price= | Read through your Pending Order Entry Type setting |
entry_price= | Absolute price |
entry_pips= | Distance in pips from the market |
entry_pct= | Percentage from the market |
Breakeven and trailing#
| Parameter | Meaning |
|---|---|
betrigger= | Pips of profit before breakeven arms |
beoffset= | Pips beyond entry to place the stop |
trailtrig= · atrtrigger= | Pips of profit before trailing starts |
traildist= | Trailing distance in pips |
trailstep= | Pips of movement before the stop moves again |
atrtimeframe= | ATR timeframe in minutes (1, 5, 15, 30, 60, 240, 1440) |
atrperiod= | ATR averaging period |
atrmultiplier= | ATR multiple for the trail distance (defaults to 1) |
Filters and metadata#
| Parameter | Meaning |
|---|---|
spread= | Only enter if the spread is at or below this, in pips |
accfilter= | Only enter if the account metric meets this value |
secret= | Your signal authentication password |
comment= | A note shown in your Signal Logs |
comment= appears in your dashboard
On PineHook your comment is stored with the signal and shown in Signal Logs rather than written into the MT5 order comment, because that field carries the identifiers PineHook uses to recognise duplicate signals and avoid executing a trade twice.
Known differences#
A short and honest list.
atrshift= | Only 0 is accepted. PineHook's ATR trailing always reads the most recent closed bar. |
comment= | Appears in Signal Logs, not in the MT5 order comment (see above). |
| Portal features | Pyramiding, Close-on-Reverse, Shadow Targets, daily profit/loss actions and multi-instance replication are PineConnector platform settings, not alert syntax. PineHook has its own equivalents for some; see PineHook vs PineConnector. |
What you gain#
Everything in Default Mode is still available while you are in compatibility mode, including features PineConnector has no equivalent for: laddered multi TP/SL, delay=, closetime=, profit-filtered closes, per-symbol EA toggles, queue control, and slippage guards.