EA Setup
Alerts
Message Structure
Expert Advisor
Debugging
Others
Syntax
Rejected signals will not appear in the Signals Log.
- License ID: long number found in the Licensing Dashboard
- Commands: do not have the equal (=) sign such as “buy”
- Symbol: asset or instrument you’d like to enter, exit or modify
- Others: components with the equal (=) sign such “risk=”
Structure
- Syntax will always be in this sequence: LicenseID,Command,Symbol,Others
- Syntax components are separated by a comma (,) and without any spacing between them
- There can only be 1 License ID, Command and Symbol per alert
Acceptable PineConnector Syntax
Unacceptable PineConnector Syntax
buy
Place a buy order at the market.
- long
- bull
- bullish
sell
Place a sell order at the market.
- short
- bear
- bearish
risk=
Function depends on the “Volume Type” selected in the EA EA Options: Lots, Dollar Amount, Percentage of Balance (Lots) and Percentage of Balance (Loss).
sl=
Place stop-loss. Computation is based on the Target Type selected in the EA EA Options: Pips, Price and Percentage.
tp=
Place take-profit. Computation is based on the Target Type selected in the EA EA Options: Pips, Price and Percentage.
comment=
Add a string into the order’s comment section. Valid for entry commands only (buy, buylimit etc).
eaoff
Halts the PineConnector EA. If the EA is halted, incoming signals will not be processed.
eaon
Reactivates the PineConnector EA from halt.
closeall
Close all positions and orders, regardless of symbol
closealleaoff
Close all positions and orders, and off/halt the PineConnector EA.
closelong
Close all buy positions of the specified symbol.
closeshort
Close all sell positions of the specified symbol.
closelongshort
Close all buy and sell positions of the specified symbol.
closelongbuy
Close all buy positions and open a new buy.
closeshortsell
Close all sell positions and open a new sell.
newsltplong
Modify the stop-loss (SL) and take-profit (TP) of the buy positions. New SL and TP are computed based on your selected Target Type on the EA.
- Position is in profit
- Current market price is sufficiently far from the entry price
If either of the conditions are not met, sending in a “newsltplong” with sl=0 will result in the Error 130 on MT4 and Error 4756 (Invalid Price) on MT5.
newsltpshort
Modify the stop-loss (SL) and take-profit (TP) of the sell positions. New SL and TP are computed based on your selected Target Type on the EA.
- Position is in profit
- Current market price is sufficiently far from the entry price
If either of the conditions are not met, sending in a “newsltpshort” with sl=0 will result in the Error 130 on MT4 and Error 4756 (Invalid Price) on MT5.
closelongpct
Close a percentage of buy positions (based on your initial volume), using your selected partial close percentage in the EA (25%, 34%, and 50%).
closeshortpct
Close a percentage of sell positions (based on your initial volume), using your selected partial close percentage in the EA (25%, 34%, and 50%).
closelongvol
Close buy positions up to the indicated value. risk= is a required parameter.
closeshortvol
Close sell positions up to the indicated value. risk= is a required parameter.
price=
Computing pending order entry price. EA Options: Pips, Specified Price, Percentage
buystop
Place buy stop above the current market price. price= is a required parameter.
buylimit
Place buy limit below the current market price. price= is a required parameter.
sellstop
Place sell stop below the current market price. price= is a required parameter.
selllimit
Place sell limit above the current market price. price= is a required parameter.
cancellong
Cancels all long orders with the specified symbol.
cancelshort
Cancels all short orders with the specified symbol.
cancellongbuystop
Cancels all long orders with the specified symbol and places a buystop order. risk= and price= are required parameters.
cancellongbuylimit
Cancels all long orders with the specified symbol and places a buylimit order. risk= and price= are required parameters.
cancelshortsellstop
Cancels all short orders with the specified symbol and places a sellstop order. risk= and price= are required parameters.
cancelshortselllimit
Cancels all short orders with the specified symbol and places a selllimit order. risk= and price= are required parameters.
newsltpbuystop
Modify the stop-loss (SL) and take-profit (TP) of the buystop orders. New SL and TP are computed based on your selected Target Type on the EA.
newsltpbuylimit
Modify the stop-loss (SL) and take-profit (TP) of the buylimit orders. New SL and TP are computed based on your selected Target Type on the EA.
newsltpsellstop
Modify the stop-loss (SL) and take-profit (TP) of the sellstop orders. New SL and TP are computed based on your selected Target Type on the EA.
newsltpselllimit
Modify the stop-loss (SL) and take-profit (TP) of the selllimit orders. New SL and TP are computed based on your selected Target Type on the EA.
Breakeven
- Automatically move the SL of the position to breakeven when betrigger= is satisfied
- Ensure that beoffset < betrigger
betrigger=
Breakeven will be activated after the position gains this number of pips. Ensure > 0
beoffset=
Offset from entry price. 0 means the SL will be placed exactly at entry price. 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.
Pip Trailing
- Automatically moves SL with the direction of the trade (up for longs, and down for shorts)
- All trailing parameters are restricted to integers — floats will be rounded to the nearest integer
- Trailing computation will be based on pips, regardless of the Target Type selected
trailtrig=
Trailing stop-loss will be activated after a trade gains this number of pips.
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.
trailstep=
Moves trailing stop-loss once price moves to favourable by a specified number of pips.
- With trailtrig=12, the first instance of trailing SL will be when price moves favourably for 12 pips (entry+12).
- The SL will be placed 8 pips lower at (entry+12-8).
- If you have a SL, the SL will be updated
- If you do not have a SL, a SL will be created for you
- With trailstep=3, the second instance of trailing SL is when price moves favourably for another 3 pips (entry+12+3).
- The SL will be placed at 8 pips lower at (entry+12+3-8).
- The third instance will be when price moves another 3 favourable pips (entry+12+3+3)
- The SL will be placed 8 pips lower at (entry+12+3+3-8), and so on.
ATR Trailing
- Instead of your SL trailing based on pips, your SL trails based on the ATR computed
- Only atrtimeframe= and atrperiod= are mandatory — other parameters are optional
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 the point of entry, a SL will be automatically added with the ATR values used.
Allowable timeframe values:
- 1 (1 minute),
- 5 (5 minutes),
- 15 (15 minutes),
- 30 (30 minutes),
- 60 (1 hour),
- 240 (4 hours),
- 1440 (1 day)
atrperiod=
ATR averaging period
atrmultiplier=
ATR Multiplier Default = 1
atrshift=
ATR Shift Default: 0
atrtrigger=
Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default: 0 (instantaneous)
Filters
spread=
Enter the position only if the spread is equal or less than the specified value in pips.
accfilter=
Enter the position only if the account requirement is met. EA Options: Account Balance, Account Equity, Margin Percentage and Free Margin
← Previous
Next →
On this page
- Syntax
- buy
- sell
- risk=
- sl=
- tp=
- comment=
- eaoff
- eaon
- closeall
- closealleaoff
- closelong
- closeshort
- closelongshort
- closelongbuy
- closeshortsell
- newsltplong
- newsltpshort
- closelongpct
- closeshortpct
- closelongvol
- closeshortvol
- price=
- buystop
- buylimit
- sellstop
- selllimit
- cancellong
- cancelshort
- cancellongbuystop
- cancellongbuylimit
- cancelshortsellstop
- cancelshortselllimit
- newsltpbuystop
- newsltpbuylimit
- newsltpsellstop
- newsltpselllimit
- Breakeven
- betrigger=
- beoffset=
- Pip Trailing
- trailtrig=
- traildist=
- trailstep=
- ATR Trailing
- atrtimeframe=
- atrperiod=
- atrmultiplier=
- atrshift=
- atrtrigger=
- Filters
- spread=
- accfilter=