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#

  1. Change the license ID in your alert messages to your PineHook license key.
  2. Point the webhook at PineHook's endpoint.
  3. 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:

InputSet to
Signal Syntax ModePineConnector Compatibility

Then, under PineConnector Syntax, match your old configuration:

InputControlsOptions
risk= meanshow risk= is sizedLots · Dollar Amount · % Balance Lots · % Balance Margin · % Balance Loss · % Equity Loss
sl= / tp= meanhow targets are readPips · Price · Percentage
pending= meanspending order entryPips from market · Specified price · Percentage from market
accfilter= checkswhich account metricBalance · Equity · Free Margin · Margin Level %
closelongpct closespartial close size10% · 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#

CommandDoes
buy · long · bull · bullishOpens a long at market
sell · short · bear · bearishOpens a short at market
LICENSE,buy,EURUSD,risk=1,sl=50,tp=100
LICENSE,long,EURUSD,risk=1,sl=50

Pending orders#

CommandDoes
buystopBuy above the market
buylimitBuy below the market
sellstopSell below the market
selllimitSell 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#

CommandDoes
closelongCloses all buy positions for the symbol
closeshortCloses all sell positions for the symbol
closelongshortCloses both sides for the symbol
closelongpct · closeshortpctCloses the percentage set in your EA
closelongvol · closeshortvolCloses the lots given in risk=
closeallCloses all positions and cancels all pending orders, on every symbol
closealleaoffSame 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#

CommandDoes
cancellongCancels buy-side pending orders
cancelshortCancels sell-side pending orders

Close and open in one alert#

CommandShort formDoes
closelongopenlongCL+OLClose longs, then open a long
closelongopenshortCL+OSClose longs, then open a short
closeshortopenlongCS+OLClose shorts, then open a long
closeshortopenshortCS+OSClose shorts, then open a short
closelongshortopenlongCLS+OLClose both sides, then open a long
closelongshortopenshortCLS+OSClose 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#

CommandDoes
cancellongbuystopCancels buy pendings, places a new Buy Stop
cancellongbuylimitCancels buy pendings, places a new Buy Limit
cancelshortsellstopCancels sell pendings, places a new Sell Stop
cancelshortselllimitCancels sell pendings, places a new Sell Limit

Modifying stops and targets#

CommandDoes
newsltplong · newsltpshortChanges SL/TP on open positions of that side
newsltpbuystop · newsltpbuylimitChanges SL/TP on those pending orders
newsltpsellstop · newsltpselllimitChanges SL/TP on those pending orders

EA control#

CommandDoes
eaonResumes the EA
eaoffHalts 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.

AlertResult
newsltplong,sl=0Moves the stop to entry on your long positions
newsltpshort,sl=0Same for shorts
closelongpct,sl=0Closes the configured percentage, then moves the remaining position's stop to entry
closelongvol,risk=0.5,sl=0Closes 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#

ParameterMeaning
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#

ParameterMeaning
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#

ParameterMeaning
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#

ParameterMeaning
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#

ParameterMeaning
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 featuresPyramiding, 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.