PineConnector Compatibility Mode
Run existing PineConnector alerts through PineHook without rewriting them, with the full command reference, migration steps, and key differences.
Last updated: 2026-10-07
PineConnector compatibility accepts alerts written in PineConnector syntax. Before sending them to a live account, match the unit settings below to your previous setup and test any command that can affect more than one position.
PineHook is independent of PineConnector, and compatibility with its alert format does not imply a partnership or endorsement. PineConnector may change how its alerts behave, so this documentation may occasionally fall behind those changes. If you are migrating from PineConnector, always test your alerts on a demo account first. We also recommend taking the time to adapt your alerts to PineHook’s native syntax.
Set up compatibility mode#
- Change the license ID in your alert messages to your PineHook license key.
- Point the webhook at PineHook's endpoint.
- Select PineConnector mode. On MT5 with Settings Source set to Dashboard, choose PineConnector under Trading → Signal syntax in dashboard settings. With Settings Source set to MetaTrader, choose it in the EA’s Signal Syntax Mode input and reconnect. On cTrader, select PineConnector under Signal syntax in dashboard settings.
Your EA settings come with you
PineConnector's risk=, sl=, tp=, and pending= values have no units of their own; their meaning comes from your syntax settings. Match PineHook's PineConnector Syntax settings to your previous setup so the same alert values retain their meaning.
The five settings below show what each value controls. For MT5 in Dashboard mode and for cTrader, set global defaults or per-license overrides under Signal syntax. MT5 in MetaTrader mode reads all five values from the EA Inputs.
| 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
These settings apply only to PineConnector alerts because native PineHook parameters specify their units directly. If you copy a PineConnector alert to several licenses, each license uses its own settings to read the values. For example, sl=50 could mean 50 pips on one license and a stop at price 50 on another. Match the settings across destination licenses if you want consistent units. Each destination’s lot multiplier then scales its calculated order size.
PineConnector commands#
The tables below show what each supported command does, though broker rules and platform behavior still apply. On cTrader, stepped trailing needs the bridge online; native continuous trailing keeps running after activation if the bridge disconnects.
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
Parameters for PineConnector entries#
These parameters follow the PineConnector unit settings above. Choose one sizing method, then add a stop or target if your strategy calls for it.
| Set | Parameters | Rule |
|---|---|---|
| Size | risk=, vol_lots=, vol_dollar=, vol_pct_bal_loss=, vol_pct_eq_loss=, vol_pct_bal_margin= | Loss-based sizes need a stop loss. |
| Stop and target | sl=, tp=, or explicit sl_pips=, tp_price=, and other unit-specific forms | sl= and tp= follow your Target Type setting. |
| Entry controls | betrigger=, beoffset=, trailtrig=, traildist=, spread=, accfilter= | Add only the controls your alert needs. |
Hedging on or off
PineHook's hedging=true/false parameter also works with PineConnector-format entries. It overrides Allow Hedging for one command. With hedging=false, any opposite position or entry order on the same broker symbol blocks the new entry on a hedging account, whatever its Magic Number, while the existing trade keeps its SL and TP.
LICENSE,sell,EURUSD,risk=0.1,magic=42,hedging=false
This example reads risk=0.1 through your Volume Type setting, and same-direction entries remain subject to your other limits. Once a close/cancel compound passes admission and readiness checks, it performs its close or cancel before checking the new entry. Standalone management commands reject hedging=, and netting and exchange accounts behave as they always have. See hedging entry protection.
PineConnector sizing methods
| 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 |
Loss-based sizing needs a stop loss, which provides the distance used to calculate volume.
PineConnector stop and target formats
| 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 |
Breakeven and trailing parameters
| 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, authentication, and comments
| 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 alert authentication password |
comment= | A note shown in your Signal Logs |
comment= appears in your dashboard
PineHook shows comment= in Signal Logs instead of writing it to the MT5 order comment. That broker field holds identifiers PineHook uses to recognize duplicate alerts and avoid a second execution.
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
Your Pending Order Entry Type setting determines whether pending= means pips from the market, an absolute price, or a percentage.
PineConnector pending entry parameters
| 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 |
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 closes positions and cancels pending orders across the broker trading account connected to the license in your message. Without a magic filter, this includes manual trades and trades opened by other strategies or licenses on that same trading account. It does not send close commands to your other PineHook licenses or broker accounts.
A symbol in the message is only a placeholder, so LICENSE,closeall,EURUSD still acts on every symbol. Use closelongshort when you want to close one symbol.
Test closeall on a demo account before using it live, especially if your previous PineConnector setup treated the command as symbol-specific. Here, the same alert can flatten the whole account.
LICENSE,closelongpct,EURUSD
LICENSE,closelongvol,EURUSD,risk=0.5
LICENSE,closeall,EURUSD
closelongvol requires risk=
For closelongvol or closeshortvol, risk= gives the number of lots to close. PineHook rejects the command when it is missing rather than risk closing the entire position.
Cancelling pending orders#
| Command | Does |
|---|---|
cancellong | Cancels buy-side pending orders |
cancelshort | Cancels sell-side pending orders |
LICENSE,cancellong,EURUSD
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 the close leg fails, PineHook does not open the new position, which would otherwise double your exposure. If there is nothing to close, the new position still opens as an ordinary entry.
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 |
LICENSE,cancellongbuystop,EURUSD,risk=1,pending=20
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 |
LICENSE,newsltplong,EURUSD,sl=50,tp=100
The values of sl= and tp= use the Target Type you set above.
sl=0 moves the stop to breakeven#
When your license uses PineConnector compatibility mode, PineHook treats sl=0 as a request to move the stop to your entry price. In PineHook Default Mode, use breakeven to move the stop to entry, or modify with sl_price=0 to remove it. The shorthand sl= is not a native PineHook parameter.
| 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
Why this one matters
In PineHook's native syntax, a stop price of zero means remove the stop. PineHook rejects sl=0 on a Default Mode license rather than guess which meaning you intended and risk removing your protection.
PineHook also rejects sl=0 on newsltp commands that target pending orders, because no position is open yet. It rejects sl=0 alongside a tp= change as well, since a breakeven move has no take-profit change to apply and silently dropping part of the request would be misleading.
EA control#
| Command | Does |
|---|---|
eaon | Resumes the EA |
eaoff | Halts the EA |
PineConnector's padded form is accepted:
LICENSE,eaoff,eaoff
Known differences#
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). |
PineHook commands in compatibility mode#
You can also use PineHook's native commands and their explicit-unit parameters in compatibility mode. PineHook syntax covers laddered targets, delayed alerts, timed closes, symbol controls, queue control, and slippage guards.