Getting Started

EA Installation

Syntax Guide

Analytics

Syntax

Syntax

Syntax

Syntax refers to the set of rules that dictate the proper construction of an alert message for PineConnector. Getting these rules right ensures your trading signals are understood and executed correctly by the Expert Advisor (EA).

šŸ’”
Quick Sample Alert Messages Here are a few examples of PineConnector-compliant alert messages:
  • 60123456789,buy,AUDUSD,risk=0.1
  • 60123456789,sell,GBPJPY,sl=50,risk=1
  • 60123456789,closelong,GBPUSD

For more examples and detailed interpretations of combined syntax, please see our Detailed Syntax Examples section.

Core Alert Message Principles

Alert Message Guidelines

To create PineConnector-compliant alert messages, please pay close attention to the following guidelines. Failure to adhere to the syntax may result in the EA rejecting your signal.

šŸ’”
Test Drive Before Going Live! Before setting up actual alerts for your live strategy, we strongly recommend sending manual or test alerts. This helps ensure:
  • The alert message configured on TradingView is valid, as per this Syntax Guide.
  • Your selected EA Settings result in the intended trading behavior.

To learn how to send manual or test alerts effectively, click here.

šŸ’”
Checking for Successful Signals If you send a signal and don't see it appear on your MetaTrader terminal as expected:
  • Check the Signals Log in your PineConnector members' portal. This log shows successfully received and processed signals.
  • image
  • Important: Rejected signals (e.g., due to incorrect syntax or an incorrect license) will not appear in this log.

Components of an Alert Message

Alert messages are made up of distinct components. Here’s what each part means:

Component
Remarks
License ID
• Your unique identifier, found in the PineConnector Licensing Dashboard. • It's typically a long number starting with 6 or 7 (e.g., 70123456789).
Command
• The specific action you want the EA to take (e.g., buy, sell, closeall). • Note: Commands do not use an equals sign (=).
Symbol
• The asset or instrument to be traded (e.g., EURUSD, GBPJPY, US30.Cash).
Others
• Additional parameters that modify the command, often including values (e.g., risk=0.5, sl=50, comment=MyStrategy). • These parameters generally use an equals sign (=).

Structure of an Alert Message

The components in your alert message must follow this specific order:

LicenseID,Command,Symbol,Others

Key Structural Rules:

  1. Order: The sequence (License ID, then Command, then Symbol, then any Other parameters) is mandatory.
  2. Commas: Components must be separated by commas (,).
    • Spaces around the commas are optional (see "Acceptable Syntax" below).
  3. Uniqueness: Each alert message can only contain one License ID, one Command, and one Symbol.

Acceptable PineConnector Syntax Examples:

  • LicenseID,Command,Symbol,Others (no spaces around commas)
  • LicenseID , Command , Symbol , Others (spaces around commas are acceptable)

Unacceptable PineConnector Syntax Examples:

  • Command,LicenseID,Symbol (Incorrect order)
  • LicenseID,Command,Command (Multiple Commands)
  • LicenseID,LicenseID,Command,Symbol (Multiple License IDs)

Command & Parameter Reference

1. Common Order Parameters

These parameters are used with various order commands (market, pending, and modification commands) to define crucial aspects of an order. They typically follow the Symbol in the alert message.

risk=

Specifies the order volume or risk exposure.

šŸ’”
This is a required parameter for all entry commands (e.g., buy, sell, buylimit, sellstop

The function of the risk= value depends on the ā€œVolume Typeā€ selected in your PineConnector EA settings on MetaTrader.

image

Common options include:

  • Lots: e.g., risk=0.1 means 0.1 lots.
  • Dollar Amount: e.g., risk=100 means the EA will calculate a lot size such that a loss to the stop-loss (if defined) approximates $100.
  • Percentage of Balance (Lots): e.g., risk=1 means the lot size is set to 1% of the account balance.
  • Percentage of Balance (Loss): e.g., risk=1 means the EA will calculate a lot size such that a loss to the stop-loss (if defined) approximates 1% of the account balance.
LicenseID,buy,EURUSD,risk=0.01
LicenseID,sell,EURCAD,risk=2

sl=

Sets the stop-loss for an order.

The interpretation of the sl= value (pips, price level, or percentage) depends on the ā€œTarget Typeā€ selected in your PineConnector EA settings.

image

Common EA options:

  • Pips: e.g., sl=50 sets the stop-loss 50 pips away from the entry price.
  • Price: e.g., sl=1.12300 sets the stop-loss at the specific price level 1.12300.
  • Percentage: e.g., sl=0.5 sets the stop-loss 0.5% away from the entry price.
LicenseID,buy,EURUSD,risk=1,sl=10.5

tp=

Sets the take-profit for an order. Similar to sl=, the value for tp= is interpreted based on the ā€œTarget Typeā€ setting in your PineConnector EA (Pips, Price, or Percentage).

LicenseID,buy,EURUSD,risk=1,tp=15

comment=

Adds a custom text comment to the order in MetaTrader. This parameter is valid for entry commands only (e.g., buy, sell, buylimit).

šŸ’”
Please ensure comment used is within 20 characters. Longer comments will default as blank.
LicenseID,buy,EURUSD,risk=1,comment=Strategy 1
LicenseID,buy,EURUSD,risk=1,comment=Strategy 2

LicenseID,buy,EURUSD,risk=1,comment= 100 5/6 
LicenseID,buy,EURUSD,risk=1,comment= Set=20 

LicenseID,buy,EURUSD,risk=1,comment=12345678901234567890 (valid, within 20 charactes)
LicenseID,buy,EURUSD,risk=1,comment=123456789012345678901 (invalid, above 20 charactes)

2. Market Order Commands

These commands are for placing orders that execute immediately at the current market price.

šŸ’”
Looking for Pending Order commands and syntax? Jump to Pending Orders section.

buy

Places a buy (long) order at the current market price. risk= is a required parameter.

šŸ’”
Valid Alternatives (case-insensitive)
  • long
  • bull
  • bullish
LicenseID,buy,EURUSD,risk=0.01
LicenseID,long,US30.Cash,sl=100,tp=200,risk=1
LicenseID,bullish,GBPJPY,risk=1,comment=Stategy Alpha

sell

Places a sell (short) order at the current market price. risk= is a required parameter.

šŸ’”
Valid Alternatives (case-insensitive)
  • short
  • bear
  • bearish
LicenseID,sell,EURUSD,risk=0.01
LicenseID,short,DAX30,risk=2
LicenseID,bear,GBPJPY,risk=1

3. Pending Order Commands

Commands for placing orders that execute when the price reaches a specified level.

pending=

Specifies the entry price or offset for a pending order.

šŸ’”
This is a required parameter for all pending order commands (e.g., buystop, buylimit).

The interpretation of the pending= value depends on the ā€œPending Order Entry Typeā€ selected in your PineConnector EA settings. Common options:

  • Pips: e.g., pending=10 means 10 pips away from the current market price.
  • Specified Price: e.g., pending=1.12500 sets the entry at this exact price.
  • Percentage: e.g., pending=0.1 means 0.1% away from the current market price.
LicenseID,buystop,EURUSD,pending=10,risk=1

buystop

Places a buy stop order, above the current market price. pending= and risk= are required parameters.

LicenseID,buystop,EURUSD,pending=10,risk=1

buylimit

Places a buy limit order, below the current market price. pending= and risk= are required parameters.

LicenseID,buylimit,EURUSD,pending=10,risk=1

sellstop

Places a sell stop order, below the current market price. pending= and risk=are required parameters.

LicenseID,sellstop,EURUSD,pending=10,risk=1

selllimit

Places a sell limit order, typically above the current market price. pending= and risk=are required parameters.

LicenseID,selllimit,EURUSD,pending=10,risk=1

4. Position and Order Management Commands

Commands for closing open positions or cancelling pending orders.

4.1 General Closing & Cancellation

closeall

Closes all open positions and deletes all pending orders that were opened by the specific instance of the PineConnector EA that receives this command. This action applies across all symbols managed by that EA instance.

LicenseID,closeall,ChartSymbol
  • ChartSymbol (Mandatory): For this command to be accepted and processed, you must specify the symbol of the chart on which the target PineConnector EA is currently running.
    • Example: If your EA is running on a GBPJPY.a chart, your command must be LicenseID,closeall,GBPJPY.a. Using EURUSD in the example below assumes the EA is on a EURUSD chart.
    • This requirement acts as a safety measure, ensuring the closeall command is intentionally directed to the correct EA instance.
  • This command will only affect positions/orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.
šŸ’”
If you are looking to close positions for a specific symbol only, use commands like closelong or closeshort instead.

cancellong

Cancels all pending buy orders (buystop, buylimit) for the specified symbol.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancellong,EURUSD

cancelshort

Cancels all pending sell orders (sellstop, selllimit) for the specified symbol.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancelshort,EURUSD

4.2 Symbol-Specific Position Closing

closelong

Closes all open buy positions of the specified symbol.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closelong,EURUSD

closeshort

Closes all open sell positions of the specified symbol.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closeshort,EURUSD

closelongshort

Closes all open buy and sell positions of the specified symbol.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closelongshort,EURUSD

4.3 Partial Position Closing

closelongpct

Closes a percentage of total open volume for buy positions of the specified symbol. The percentage is based on your selected "Partial Close Percentage" in the EA settings (e.g., 25%, 34%, 50%).

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closelongpct,EURUSD

closeshortpct

Closes a percentage of total open volume for sell positions of the specified symbol, using the EA's "Partial Close Percentage" setting.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closeshortpct,EURUSD

closelongvol

Closes a specific volume of open buy positions for the specified symbol, up to the value indicated by risk=.

risk= is a required parameter and represents the volume to close

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closelongvol,EURUSD,risk=3
LicenseID,closelongvol,EURUSD,risk=0.5
šŸ’”
Examples (FIFO Logic) Positions are typically closed on a First-In, First-Out (FIFO) basis. Assume we have 3 open long EURUSD positions, totaling 3.5 lots:
  • Position A: Buy 1 lot (opened first)
  • Position B: Buy 2 lots (opened second)
  • Position C: Buy 0.5 lots (opened last)
  1. Partial Closure Across Multiple Positions
    • Command: LicenseID,closelongvol,EURUSD,risk=2.8
    • Result: Position A (1 lot) closes fully. Position B (2 lots) partially closes 1.8 lots, leaving 0.2 lots. Position C (0.5 lots) is unaffected.
  2. Closing More Than Total Volume
    • Command: LicenseID,closelongvol,EURUSD,risk=4
    • Result: All positions (A, B, C) close fully as the requested close volume (4 lots) exceeds total open volume (3.5 lots).
  3. Closing Less Than Smallest Part of Oldest Position
    • Command: LicenseID,closelongvol,EURUSD,risk=0.4
    • Result: Position A (1 lot) partially closes 0.4 lots, leaving 0.6 lots. Positions B and C are unaffected.

closeshortvol

Closes a specific volume of open sell positions for the specified symbol, up to the value indicated by risk=.

risk= is a required parameter

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closeshortvol,EURUSD,risk=3
LicenseID,closeshortvol,EURUSD,risk=0.5

5. Order Modification Commands

Commands to change parameters of existing open positions or pending orders.

5.1 Modifying Open Positions

newsltplong

Modifies the stop-loss (SL) and/or take-profit (TP) of all open buy positions for the specified symbol. New SL/TP values are computed based on your selected ā€œTarget Typeā€ in the EA.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltplong,EURUSD,sl=10
LicenseID,newsltplong,EURUSD,tp=20
LicenseID,newsltplong,EURUSD,sl=30,tp=60

LicenseID,newsltplong,EURUSD,sl=1.12345 (price)
LicenseID,newsltplong,EURUSD,sl=1,tp=2 (percentage)

LicenseID,newsltplong,EURUSD,sl=0 (breakeven)
šŸ’”
Interpreting sl= / tp= values for Modification:
  • Pips: If Target Type is Pips, sl=10 means the EA sets the SL 10 pips from the current market price (not original entry price) at the time of modification.
  • Percentage: If Target Type is Percentage, sl=1 means the EA sets the SL 1% from the current market price.
šŸ’”
Move SL to Breakeven using sl=0 To move the stop-loss of all your buy positions for the specified symbol to their entry price (breakeven), send sl=0. Required Conditions for Breakeven (sl=0)
  • The position must be in profit.
  • The current market price must be sufficiently far from the entry price to allow the SL modification (broker/platform minimum distance rules apply). If these conditions are not met, the modification might fail, potentially resulting in Error 4756 (Invalid Price) on MT5.

newsltpshort

Modifies the SL and/or TP of all open sell positions for the specified symbol. Works similarly to newsltplong.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltpshort,EURUSD,sl=10
LicenseID,newsltpshort,EURUSD,tp=20
LicenseID,newsltpshort,EURUSD,sl=30,tp=60

LicenseID,newsltpshort,EURUSD,sl=1.12345 (price)
LicenseID,newsltpshort,EURUSD,sl=1,tp=2 (percentage)

LicenseID,newsltpshort,EURUSD,sl=0 (breakeven)

(Refer to newsltplong asides for interpretation of values and breakeven conditions.)

5.2 Modifying Pending Orders

newsltpbuystop

Modifies the SL and/or TP of all pending buystop orders for the specified symbol.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltpbuystop,EURUSD,sl=10
LicenseID,newsltpbuystop,EURUSD,tp=20
LicenseID,newsltpbuystop,EURUSD,sl=30,tp=60

newsltpbuylimit

Modifies the SL and/or TP of all pending buylimit orders for the specified symbol. This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltpbuylimit,EURUSD,sl=10
LicenseID,newsltpbuylimit,EURUSD,tp=20
LicenseID,newsltpbuylimit,EURUSD,sl=30,tp=60

newsltpsellstop

Modifies the SL and/or TP of all pending sellstop orders for the specified symbol. New SL and TP are computed based on your selected Target Type on the EA.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltpsellstop,EURUSD,sl=10
LicenseID,newsltpsellstop,EURUSD,tp=20
LicenseID,newsltpsellstop,EURUSD,sl=30,tp=60

newsltpselllimit

Modifies the SL and/or TP of all pending selllimit orders for the specified symbol.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,newsltpselllimit,EURUSD,sl=10
LicenseID,newsltpselllimit,EURUSD,tp=20
LicenseID,newsltpselllimit,EURUSD,sl=30,tp=60

6. Combined Action Commands

These commands perform multiple actions in sequence, such as closing existing positions/orders and then opening new ones.

6.1 Close Position & Open New Market Order

closelongbuy

Closes all open buy positions for the specified symbol and then immediately opens a new buy market order. risk= is required for the new order.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closelongbuy,EURUSD,risk=1

closeshortsell

Closes all open sell positions for the specified symbol and then immediately opens a new sell market order. risk= is required for the new order.

This command will only affect positions opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closeshortsell,EURUSD,risk=1

6.2 Cancel Pending Orders & Open New Pending Order

cancellongbuystop

Cancels all pending buy orders (buystop, buylimit) for the specified symbol and then places a new buystop order. risk= and pending= are required for the new order.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancellongbuystop,EURUSD,risk=1,pending=10,sl=15,tp=20

cancellongbuylimit

Cancels all pending buy orders for the specified symbol and then places a new buylimit order. risk= and pending= are required.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancellongbuylimit,EURUSD,risk=1,pending=10,sl=15,tp=20

cancelshortsellstop

Cancels all pending sell orders for the specified symbol and then places a new sellstop order. risk= and pending= are required.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancelshortsellstop,EURUSD,risk=1,pending=10,sl=15,tp=20

cancelshortselllimit

Cancels all pending sell orders for the specified symbol and then places a new selllimit order. risk= and pending= are required.

This command will only affect orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,cancelshortselllimit,EURUSD,risk=1,pending=10,sl=15,tp=20

7. Advanced Stop-Loss Management Parameters

These are optional parameters that can be added to entry commands (e.g., buy, sell, buylimit) to enable dynamic stop-loss behaviors like breakeven or trailing.

Breakeven Parameters (betrigger=, beoffset=)

Automatically moves the position's stop-loss to breakeven (or a slight offset) once a certain profit is achieved.

šŸ’”
Alternative to Manual Breakeven: While newsltplong or newsltpshort with sl=0 can move an SL to breakeven manually at a later stage, these parameters (betrigger=, beoffset=) set up an automatic breakeven condition at the point of order entry.

To use automatic breakeven, include both betrigger= and beoffset= in your entry command syntax. Ensure beoffset= is less than betrigger=.

  • betrigger=: The number of pips a position must gain before the breakeven function is activated. Must be greater than 0.
  • beoffset=: The offset in pips from the entry price where the new stop-loss will be placed.
    • beoffset=0: SL placed exactly at the entry price.
    • beoffset=1: For a buy trade, SL placed 1 pip above entry; for a sell trade, 1 pip below entry (protecting 1 pip of profit).
LicenseID,buy,EURUSD,risk=1,sl=20,betrigger=10,beoffset=2

Ensure that the 2 parameters ā€œbetrigger=ā€ and ā€œbeoffset=ā€ are present in your syntax if using this feature.

šŸ’”
Interpretation of Example
  • A buy order for EURUSD is placed with an initial stop-loss 20 pips away.
  • If the trade moves 10 pips in profit (betrigger=10), the stop-loss will automatically be moved to 2 pips above the entry price (beoffset=2).

Pip Trailing Parameters (trailtrig=, traildist=, trailstep=)

Automatically moves the stop-loss in the direction of the trade as it becomes more profitable, based on pip values.

  • All pip trailing parameters accept integer values; floats will be rounded.
  • Trailing computation is based on pips, regardless of the "Target Type" selected in EA settings.
šŸ’”
Spelling Check! Please check that you spell ā€œtrailingā€ correctly in your syntax. Some users faced syntax issues as they spelled it as ā€œtrialingā€.

To use pip trailing, include trailtrig=, traildist=, and trailstep= in your entry command.

  • trailtrig=: The number of pips a trade must gain before the trailing stop-loss is first activated.
  • traildist=: The distance in pips from the current price at which the trailing stop-loss will be maintained. If no initial sl= is set, the first SL will be placed at traildist pips once trailtrig is met.
  • trailstep=: The number of pips the price must move further in a favorable direction before the trailing stop-loss is adjusted again (maintaining the traildist).
LicenseID,buy,EURUSD,risk=1,trailtrig=12,traildist=8,trailstep=3

Ensure that the 3 parameters ā€œtrailtrig=ā€, ā€œtraildist=ā€ and ā€œtrailstep=ā€ are present in your syntax if using this feature.

šŸ’”
Interpretation of Example
  • trailtrig=12: Trailing SL first activates when the price moves 12 pips in favor (entry + 12 pips). The SL is placed at (entry + 12 - traildist) = (entry + 4 pips).
  • trailstep=3: If the price moves another 3 pips in favor (to entry + 15 pips), the SL is trailed again to (entry + 15 - traildist) = (entry + 7 pips).
  • This continues for every additional 3 pips gained.
šŸ’”
Negative trailtrig= for Immediate Activation Using a negative value (e.g., trailtrig=-10) or trailtrig=0 can activate trailing immediately. trailtrig=0 might activate after the spread is covered.
šŸ’”
Non-FX Instruments (e.g., Indices): For instruments like US100, a value of 10 for a pip-based parameter might mean 1 index point. Always test with your specific instrument. The EA's "Experts" tab in MetaTrader may print trailing information and activation prices.

ATR Trailing Parameters (atrtimeframe=, atrperiod=, atrmultiplier=, atrshift=, atrtrigger=)

Automatically trails the stop-loss based on the Average True Range (ATR) indicator, using MetaTrader's price data (not TradingView's). This allows the SL to adapt to market volatility. Only atrtimeframe= and atrperiod= are mandatory if using ATR trailing; other ATR parameters have defaults.

šŸ’”
ATR Trailing is based on your broker’s MetaTrader prices. Minor discrepancies may occur if comparing to TradingView ATR values.
  • atrtimeframe=: The chart timeframe (in minutes) on which the ATR is calculated. The SL updates once per bar close of this timeframe. If an initial sl= is not specified, an SL will be automatically added based on ATR values.
    • MT4 Allowable Values: 1 (1 min), 5, 15, 30, 60 (1 hr), 240 (4 hr), 1440 (1 day).
    • šŸ’”
      MT5 Allowable Timeframes On MetaTrader 5, there are no limits to the allowable timeframe. You may input any timeframe value you prefer such as ā€œatrtimeframe=10ā€.
  • atrperiod=: The averaging period for the ATR calculation (e.g., 14 for a 14-period ATR).
  • atrmultiplier=: The multiple of the ATR value used to calculate the stop-loss distance. Default: 1.
  • atrshift=: The bar shift for ATR calculation. 0 uses the most recently closed candle's ATR, 1 uses the second most recent, etc. Default: 0.
  • atrtrigger=: The number of pips a trade must gain before ATR trailing is activated. Default: 0 (activates immediately, subject to initial SL placement).
LicenseID,buy,EURUSD,risk=1,sl=10,
atrtimeframe=60,atrperiod=14,atrmultiplier=2,atrtrigger=8

Ensure that the 2 parameters ā€œatrtimeframe=ā€ and ā€œatrperiod=ā€ are present in your syntax if using this feature. Other ATR components are optional and will use their default values if omitted.

šŸ’”
Interpretation of Example
  • A buy order for EURUSD is placed with an initial SL 10 pips away.
  • ATR Trailing will activate after the price moves 8 pips in favor (atrtrigger=8).
  • The trailing SL distance will be based on an ATR calculated on the 60-minute (atrtimeframe=60) chart, using a 14-period (atrperiod=14) ATR, and the distance will be 2 times (atrmultiplier=2) this ATR value.

8. Trade Entry Filters

Optional parameters that can be added to entry commands to prevent trades unless certain market or account conditions are met.

spread=

Allows an entry order only if the current market spread for the instrument is equal to or less than the specified value in pips.

LicenseID,buy,EURUSD,risk=1,spread=2
LicenseID,buy,EURUSD,risk=1,spread=1.22

accfilter=

Allows an entry order only if a specified account metric meets a certain value.

The metric checked depends on the Account Filter Type selected in your PineConnector EA settings. EA Options for Filter Type: Account Balance, Account Equity, Margin Percentage and Free Margin

LicenseID,buy,EURUSD,risk=1,accfilter=500
šŸ’”
Example Interpretation
  • Assume "Account Filter Type" in EA is set to Account Balance.
  • Syntax: LicenseID,buy,EURUSD,risk=1,accfilter=500
  • Interpretation: The buy signal will only be processed if the Account Balance is $500 or higher. If less than $500, the signal is ignored.

9. EA Management Commands

Commands to control the operational state of the PineConnector EA.

eaoff

Halts the PineConnector EA. If the EA is halted, incoming signals will not be processed.

Note: For the eaoff command, the third parameter (where a symbol typically goes) must also be eaoff. This acts as a specific instruction identifier for the EA.

LicenseID,eaoff,eaoff

eaon

Reactivates a halted PineConnector EA.

  • Note: Similar to eaoff, the third parameter must also be eaon.
LicenseID,eaon,eaon

closealleaoff

Closes all open positions and pending orders managed by the specific EA instance (similar to closeall) and then halts that PineConnector EA (similar to eaoff).

This command will only affect positions/orders opened by this PineConnector EA unless Magic Restriction is turned off in the EA.

LicenseID,closealleaoff,ChartSymbol
  • ChartSymbol (Mandatory): As with closeall, you must specify the symbol of the chart on which the target EA is running for the command to be accepted.
    • Example: LicenseID,closealleaoff,GBPJPY.a if the EA is on a GBPJPY.a chart.

10. Authentication Parameters

secret=

Include this parameter in your alert message to authenticate the signal using a pre-defined secret key. This is only required if you have enabled Signal Authentication in your PineConnector Portal.

LicenseID,buy,EURUSD,risk=1,secret=SECRETKEY
šŸ’”
Self-Defined Secret Key The signal will only be relayed to your MetaTrader terminal if the secret= value in your alert matches the secret key you've set in the PineConnector Portal.
image

11. Sample Combined Syntax

This section provides examples of how different parameters can be combined in an alert message.

Market Orders (buy/sell)

Syntax
Interpretation
60123456789,buy,AUDUSD,risk=0.01
• Enters a long AUDUSD trade • Opens a 0.01 position size (ā€œlotsā€ volume type)
60123456789,sell,GBPJPY,sl=50,tp=150,risk=1
• Enters a short volume GBPJPY trade • Opens a 1 volume position (ā€œlotsā€ volume type) • SL and TP placed 50 and 150 pips from current price (ā€pipsā€ target type)
60123456789,buy,EURUSD,risk=1,spread=3
• Opens a buy EURUSD at the market if current spread is 3 or lower • Opens a position with 1 volume (ā€œlotsā€ volume type) • No SL or TP will be added
60123456789,closelong,GBPUSD
• Closes the all GBPUSD long trades
60123456789,newsltplong,EURUSD,sl=10,tp=30
• Updates SL to 10 pips from current market price (ā€œpipsā€ target type) • Updates TP to 30 pips from current market price (ā€œpipsā€ target type)

With Pips or ATR Trailing, or Breakeven

Syntax
Interpretation
60123456789,buy,EURUSD,sl=1.20,risk=1, trailtrig=15,traildist=10,trailstep=12
• Opens a long EURUSD position • Volume is dynamically computed which risks 1% of your account balance (ā€œpercentage of balance, lossā€ volume type) • Initial SL at 1.20 (ā€œpriceā€ target type) • Trailing stop to activate when price moves favorably by 15 pips • Every 12 pips move in favor of direction, the stop-loss will move to 10 pips from current price
60123456789,buy,EURUSD,sl=10, atrtimeframe=60,atrperiod=14,atrmultiplier=2,atrtrigger=8,risk=1
• Opens a buy EURUSD at the market • Opens 5 volumes (ā€œlotsā€ volume type) • SL placed 10 pips away (ā€pipsā€ target type) • ATR Trailing will begin after 8 pips of favorable move. • ATR is computed using the average of the previous 14 60-min candles, multiplied by 2.
60123456789,buy,EURCAD,sl=100,risk=5,betrigger=30,beoffset=5
• Opens a buy EURCAD at the market • Opens 5 volumes (ā€œlotsā€ volume type) • SL placed 10 pips away (ā€pipsā€ target type) • SL will be moved to (entry price + 5 pips) when price has moved favorably by 30 pips.

Pending Orders (buylimit, selllimit, buystop, sellstop)

Syntax
Interpretation
60123456789,selllimit,EURUSD,price=1.2340,sl=10,risk=1
• Places a sell limit on EURUSD order • Entry price set at 1.2340 (ā€priceā€ pending order entry type) • Opens a position with 1 volume (ā€œlotsā€ volume type) • SL placed 10 pips away from entry price (ā€pipsā€ target type)
60123456789,cancellong,EURUSD
• Cancels all long pending orders (buystop and buylimit) for EURUSD