Syntax Guide
Please refer to the updated Syntax Guide here:
https://docs.pineconnector.com/syntax
This guide is to assist you in crafting your alert messages to be compliant to our syntax.
This guide is to assist you in crafting your alert messages to be compliant to our syntax.
Command | Description | Examples |
---|---|---|
License ID |
License ID is long string found in the members portal |
5123456789012 |
Order |
Main Order Command |
buy, sell, buystop, buylimit, sellstop, selllimit, closelong, cancellong, closeshort, cancelshort, newsltplong, newsltpshort |
Symbol |
Symbol, asset or instrument you would like to enter, exit or modify |
EURUSD GER30 |
risk= (required parameter for ALL entry commands such as buy and buylimit) |
"risk=" can be toggled in the EA with either of these options: 1. Based on Dollar Amount 2. As per tradingView Alert Message 3. Percentage of Balance |
risk=0.05 risk=2 |
price= (required parameter for pending orders) |
"price=" can be toggled in the EA with either of these options: Please note that we recommend Pips from current market price due to differences in quotes on TradingView and your Broker. |
price=1.158 price=10 |
sl= tp= |
"sl=" and "tp=" can be toggled in the EA with either of these options: 1. SL and TP based on Pips (from open price) 2. SL and TP based on Price (as indicated in your alert message) 3. SL and TP based on Percentage (from open price) - To place SL 1% and TP 2.5% away, please use sl=1 and tp=2.5 Please note that we recommend SL and TP based on Pips due to differences in quotes on TradingView and your Broker. |
sl=1.2012 sl=25 tp=1.2022 tp=50 |
comment= |
Add a comment to an order or position |
comment="hello" comment="strategy 1" |
eaon eaoff |
A command to resume or halt the PineConnector EA |
licenseid,eaon,eaon |
All syntax are to be in this structure: Examples with basic commands*: *Please Refer to "Sample Combined Syntax" below for more comprehensive sample syntax with explanations |
Command | Description | Examples |
---|---|---|
buy | Place buy position | buy |
sell | Place sell position | sell |
closelong |
Close the full long position of that symbol |
ID,closelong,EURUSD |
closeshort | Close the full short position of that symbol | ID,closeshort,EURUSD |
closelongshort | Close the full long and short positions of that symbol | ID,closelongshort,GBPJPY |
closelongbuy |
Instead of sending in a closelong and a buy seprately, you may use this dual command to close all open buys and open a new buy position. If you do not have a buy position open, nothing will be closed and your buy will still open. |
ID,closelongbuy,EURUSD,risk=0.01 |
closeshortsell |
Instead of sending in a closeshort and a sell separately, you may use this dual comand to close all open sells and open a new sell position. If you do not have a sell position open, nothing will be closed and your sell will still open. |
ID,closeshortsell,EURUSD,risk=0.01 |
*Important for closelongbuy and closeshortsell: Sending in both closelong and buy separately at the same time is risky.The buy alert might be processed first followed by the closelong resulting in no open trades. Similarly, sending in both closeshort and sell at the same time is not recommended. Please use the dual commands above. |
||
newsltplong* |
Move the stoploss, takeprofit or both SL and TP of ALL buy trades with that symbol | ID,newsltplong,EURUSD,sl=1.22 ID,newsltplong,EURUSD,tp=15 ID,newsltplong,EURUSD,sl=20,tp=10 |
newsltpshort* |
Move the stoploss, takeprofit or both SL and TP of ALL sell trades with that symbol | ID,newsltpshort,GBPJPY,sl=152.11 ID,newsltpshort,GBPJPY,tp=150.51 ID,newsltpshort,GBPJPY,sl=30,tp=50 |
*the new SL and TP will be computed based on your target type in your EA Settings - pips, price or percentage Sample output in the Experts tab, with percentage-based target: |
||
closelongpct |
Partially close long positions based on your selected percentage in the EA Options of 25%, 34%, and 50% |
ID,closelongpct,EURUSD |
closeshortpct |
Partially close short positions based on your selected percentage in the EA Options of 25%, 34%, and 50% |
ID,closeshortpct,EURUSD |
closelongvol | Close long positions up to value indicated | ID,closelongvol,EURUSD,risk=2 |
closeshortvol | Close short positions up to value indicated | ID,closeshortvol,EURUSD,risk=1 |
Command | Description | Examples |
---|---|---|
buystop |
Place Buy Stop order above current market price (please ensure you have "price=") |
ID,buystop,USOIL, price=75,sl=70 |
buylimit |
Place Buy Limit order below current market price (please ensure you have "price=") |
ID,buylimit,USOIL, price=65,sl=60 |
sellstop |
Place Sell Stop order below current market price (please ensure you have "price=") |
ID,sellstop,USOIL, price=75,sl=80 |
selllimit |
Place Sell Limit order above current market price (please ensure you have "price=") |
ID,selllimit,USOIL, price=65,sl=70 |
cancellong | Cancels all long orders that was placed by the PineConnector EA (buystop and buylimit) for the accompanying symbol | ID,cancellong,NAS100 |
cancelshort | Cancels all short orders that was placed by the PineConnector EA (sellstop and selllimit) for the accompanying symbol | ID,cancelshort,GBPJPY |
cancellongbuystop | Instead of sending in a cancellong and a buystop separately, you may use this dual comand to close all long orders (buystop and buylimit) and open a new buystop order. | ID,cancellongbuystop,EURUSD,risk=0.01,price=10,sl=15,tp=20 |
cancellongbuylimit | Instead of sending in a cancellong and a buylimit separately, you may use this dual comand to close all long orders (buystop and buylimit) and open a new buylimit order. | ID,cancellongbuylimit,EURUSD,risk=0.01,price=10,sl=15,tp=20 |
cancelshortsellstop | Instead of sending in a cancelshort and a sellstop separately, you may use this dual comand to close all long orders (sellstop and selllimit) and open a new sellstop order. | ID,cancelshortsellstop,EURUSD,risk=0.01,price=10,sl=15,tp=20 |
cancelshortselllimit | Instead of sending in a cancelshort and a selllimit separately, you may use this dual comand to close all long orders (sellstop and selllimit) and open a new selllimit order. | ID,cancelshortselllimit,EURUSD,risk=0.01,price=10,sl=15,tp=20 |
*Important for cancellongbuystop, cancellongbuylimit, cancelshortsellstop and cancelshortselllimit: Sending in both cancellong and buystop/buylimit separately at the same time is risky.The buystop/buylimit alert might be processed first followed by the cancellong resulting in no open trades. Similarly, sending in both cancelshort and sellstop/selllimit at the same time is not recommended. Please use the dual commands above. |
||
newsltpbuystop* | Change the SL, TP or both SLTP of buy stop orders with the indicated symbol | ID,newsltpbuystop,EURUSD,sl=25 |
newsltpbuylimit* | Change the SL, TP or both SLTP of buy limit orders with the indicated symbol | ID,newsltpbuylimit,EURUSD,tp=25 |
newsltpsellstop* | Change the SL, TP or both SLTP of sell stop orders with the indicated symbol | ID,newsltpsellstop,EURUSD,sl=25,tp=50 |
newsltpselllimit* | Change the SL, TP or both SLTP of sell limit orders with the indicated symbol | ID,newsltpselllimit,EURUSD,tp=25,sl=25 |
*the new SL and TP will be computed based on your target type in your EA Settings - pips, price or percentage |
Command | Description | Examples |
---|---|---|
betrigger= |
Breakeven will be activated after a trade gains this number of pips beyond opening price. *Ensure that value is minimally the broker's stops level in pips. |
betrigger=30 |
beoffset= |
Offset from the entry price. 0 means the SL will be placed exactly at entry price while 1 means 1 pip above the entry price for buy trades and 1 pip below for sell trades. This is the amount of pips you'd like to protect. *Ensure that beoffset<bettrigger |
beoffset=5 |
Your Breakeven parameters will be stored in the position's Comment area. Please visually confirm that your parameters are added to the comment's section. |
Command | Description | Examples |
---|---|---|
trailtrig= |
Trailing stop-loss will be activated after a trade gains this number of pips. If your trailtrig=0, price will have to minimally move the bid-ask spread to begin. |
trailtrig=12 |
traildist= |
Distance of the trailing stop-loss from current price. SL will be opened at traildist, after trailtrig is met, even if you do not have a SL placed. Value Restriction: Integers only *Important: "Stops Level" is the minimum required distance between current market price and your SL, set by your broker.
|
traildist=8 |
trailstep= |
Moves trailing stop-loss once price moves favourable by a specified number of pips.
|
trailstep=3 |
Example configuration: Buy position with trailtrig=12, traildist=8 and trailstep=3
Your Pips Trailing parameters will be stored in the position's Comment area. Please visually confirm that your parameters are added to the comment's section. |
Command | Description | Examples |
---|---|---|
atrtimeframe=
|
ATR Trailing Stop will be based on the specified timeframe in minutes and will only update once per bar close If stop loss not specified at point of entry, a SL will be automatically added with the ATR values used Allowable timeframe values:
|
atrtimeframe=15 |
atrperiod= |
ATR averaging period
|
atrperiod=14 |
atrmultiplier= |
ATR Multiplier
|
atrmultiplier=1.5 |
atrshift= |
ATR Shift
|
atrshift=1 |
atrtrigger= |
Activate the trigger of ATR Trailing after market moves favorably by X number of pips
Default trigger: 0 (instantaneous) |
atrtrigger=10 |
Please visually confirm that your parameters are added to the comment's section. |
Command | Description | Examples |
---|---|---|
spread= |
Only orders with spread equal or less than specified spread in pips will be executed |
spread=2 |
|
Command | Description | Example |
---|---|---|
accfilter= |
Only execute signals your signals if they meet certain account requirements
Account Filter Options:
|
accfilter=500 |
Example:
Sample Experts output when account filter requirement is met |
Scenario | Recommended Trail Settings |
---|---|
|
|
|
|
Other Notes: Values are in pips. When trading non-FX, such as the US100, using a value of 10 may mean 1 point in the index. Do test it first. |
Sample Syntax | Interpretation |
---|---|
5123456789012,buy,AUDUSD,risk=0.01 |
Enter a long AUDUSD trade with 0.01 position size EA Settings
|
5123456789012,sell,GBPJPY,sl=50,tp=150,risk=1 |
Enter a short 1 volume GBPJPY trade with SL and TP being 50 and 150 pips from current price EA Settings
|
5123456789012,closelong,GBPUSD |
Closes the all GBPUSD long trades EA Settings
|
5123456789012,buy,EURUSD,sl=1.20,risk=1, trailtrig=15,traildist=10,trailstep=12 |
Going long EURUSD with initial SL at 1.20 risking 1% of account balance. 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. EA Settings
|
5123456789012,buy,EURCAD,sl=100,risk=5, betrigger=30,beoffset=5 |
Going long EURCAD with initial SL at 100 pips away, risking 5 volumes. SL will be moved to (entry price + 5 pips) when price has moved favorably by 30 pips. EA Settings
|
5123456789012,selllimit,EURUSD,price=1.2340,sl=10,risk=1 |
Place a sell limit on EURUSD at price of 1.2340 with a 10 pips stop-loss. Lot size/Volume of 1. EA Settings
|
5123456789012,cancellong,EURUSD |
Cancel all long pending orders (buystop and buylimit) for EURUSD EA Settings
|
5123456789012,buy,EURUSD,risk=1,spread=3 |
Buy EURUSD at the market if current spread is 3 or lower EA Settings
|
5123456789012,newsltplong,EURUSD,sl=10,tp=30 |
Update SL to 10 pips and TP to 30 pips from current market price EA Settings
|
5123456789012,buy,EURUSD,sl=10, atrtimeframe=60,atrperiod=14,atrmultiplier=2,atrtrigger=8 |
Buy EURUSD at the market with SL placed 10 pips away. 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. EA Settings
|
Components | Remarks | Example |
---|---|---|
Spacing in Syntax | There should be no spacing in your syntax. |
Incorrect: ID , buy , EURUSD , risk=1 Correct: ID,buy,EURUSD,risk=1 |
SL, TP, BE, Trailing | Settings cannot be too tight. Refer to your symbol information in the symbol list under "Stops Level" | 1 pip from current price |
Tick Size | Targets have to comply with symbol's tick size. Refer to "Tick Size" | UK100 CFDs with a tick size of 0.5. Your target ending with 0.3 will be rejected. |
Volume | Minimum volume should be met. Refer to "Minimal Volume" | 0.1 minimum volume. Trade with volume or increments of 0.01 will be rejected. |