PineConnector EA
Component | Version |
Portal | v3.14 |
Echo | v1.0.3 |
MetaTrader 4 EA | v3.36 |
MetaTrader 5 EA | v3.36 |
Last updated: Wednesday, 13th November 2024
License ID
Input your License ID found in the Licensing Dashboard to connect to the PineConnector server. It is a long value, usually starting with a 6 or 7 such as 60123456789.
Syntax Settings
Target Type (sl=, tp=)
Determines how sl= and tp= targets are computed.
- Pips
- If EURUSD is at 1.0567, going long/buy with “sl=12” will mean SL to be placed at 1.0555
- For non-FX instruments such as NAS100/US100, please send in a test trade to see how the computation works for that symbol. Typically, you may have to multiply the given value by a factor of 10.
- Price
- “sl=1.12345” means SL to be placed at 1.12345
- This option is not recommended due to the discrepancy in quotes between TradingView and your broker. It may cause errors, particularly for target prices being too close to the current market price. It is advisable to use caution when using this option.
- Percentage
- If BTCUSD is at $20000, going long/buy with “sl=1” will mean SL to be placed 1% away, at $19800
Volume Type (risk=)
Determines how volume is computed.
- Lots
- Indicating "risk=1" will mean 1 volume/lot will be opened
- Dollar Amount
- The amount that you will lose if your trade hits the specified SL
- If you have an EURUSD trade with 15 pip SL with $1000, risk=1 with this Volume Type will mean that hitting the SL you will lose $10
- Percentage of Balance, Lots
- Using “risk=1”,
- 0.1 lot will open on a $1000 account
- 1 lot will open on a $10,000 account
- 10 lots will open on a $100,000 account
- sl= syntax is not required
- Percentage of Balance, Margin
- If you set "risk=1" on a $1000 account, it means that opening a position will increase the margin by 1% or $10
- Percentage of Balance, Loss
- Using “risk=1” on a $1000 balance translates to you losing 1% or $10 if you were to hit SL
- sl= syntax is required
- Position size will be computed automatically based on the SL specified
- Percentage of Equity, Loss
- Using “risk=1” on a $1000 equity translates to you losing 1% or $10 if you were to hit SL
- sl= syntax is required
- Position size will be computed automatically based on the SL specified
Pending Order Entry (price=)
Determines how your pending order’s entry price is computed.
- Your sl= and tp= targets are still based on your Target Type option
- The placement of your targets will be based off your pending order’s entry price instead of the current market price
- Pips from Current Market Price
- With EURUSD at 1.2468, a buy limit with “price=8” will have the pending order entry price set at 1.2460
- Specified Price from TradingView Alert
- Indicating “price=1.2460” will set the pending order at exactly 1.2460
- This option is not recommended due to the discrepancy in quotes between TradingView and your broker. It may cause errors, particularly for entry prices close to the current market price. It is advisable to use caution when using this option.
- Percentage from Current Market Price
- With BTCUSD at 20000, a buy limit “price=1” will have the pending order entry price set at $19800
Account Filter (accfilter=)
Determines the basis of the Account Filter.
- Balance
- Using “accfilter=1000”, the signal will only be processed if your account balance is more than $1000
- Equity
- Using “accfilter=1000”, the signal will only be processed if your account equity is more than $1000
- Free Margin
- Using “accfilter=1000”, the signal will only be processed if your free margin is more than $1000
- Margin Percentage
- Using “accfilter=200”, the signal will only be processed if your margin percentage is more than 200%
- With no open trades, your margin percentage will be 0 and your signal will be processed.
EA Input
Target Options (affecting both SL and TP)
- Pips (default)
- Percentage
- Price (not recommended)
Volume Options (affecting Risk)
- Lots (default)
- Dollar
- Percentage of Balance, Lots
- Percentage of Balance, Margin
- Percentage of Balance, Loss
Setting
Determines which values are used to process incoming signals.
- Signal Parameters Only
- EA input values for SL, TP, and risk are ignored.
- Signals will be processed according to your alert's parameters ("sl=", "tp=", and "risk=").
- EA Parameters Only
- EA input values specified in the EA are used for processing your signals.
- Signal parameters ("sl=", "tp=", and "risk=") are ignored.
- This option is ideal if you want to continually optimize your SL, TP, and risk without the need to modify all your alerts.
- SLTP from EA, Risk from Signal
- EA will utilise your SL and TP input values along with your signal’s risk parameter.
- SLTP from Signal, Risk from EA
- EA will utilise your SL and TP values from your alert message along with your EA’s risk input.
Input | EA | Signal |
SL | 10 | 20 |
TP | 15 | 25 |
Risk | 1 | 2 |
EA will process the sl, tp and risk with 20, 25 and 2 respectively — the signal parameters.
Input | EA | Signal 1 | Signal 2 |
SL | 10 | 20 | unspecified* |
TP | 15 | 25 | unspecified |
Risk | 1 | 2 | unspecified |
EA will process the sl, tp and risk with 10, 15 and 1 respectively for both trades — the EA inputs specified.
*An example a signal with unspecified SL, TP and Risk is LicenseID,buy,EURUSD
.
Input | EA | Signal |
SL | 10 | 15 |
TP | 20 | 25 |
Risk | 1 | 2 |
EA will process the sl, tp and risk with 10, 20 and 2 respectively.
Input | EA | Signal |
SL | 10 | 15 |
TP | 20 | 25 |
Risk | 1 | 2 |
EA will process the sl, tp and risk with 15, 25 and 1 respectively.
Stop Loss, Take Profit, Risk
General Settings
Pyramiding
Determines how multiple orders are treated.
This EA option will only recognise positions opened by the PineConnector EA - to remove this restriction, turn Magic Restriction off in the EA.
- On
- All incoming trades will open without restrictions
- On — If symbol & direction in profit
- An incoming buy EURUSD will only open if summation of all buy EURUSDs has a profit of more than $0
- Off — Either 1 Buy OR 1 Sell
- If you already have 1 buy EURUSD, the sell EURUSD will not open
- If you already have 1 buy EURUSD, the next buy EURUSD will not open
- Off — Only 1 Buy AND 1 Sell
- If you already have 1 buy EURUSD, the sell EURUSD will open
- If you already have 1 buy EURUSD, the next buy EURUSD will not open
Close on Reverse
Determines the treatment of opposite signals.
This EA option will only recognise positions opened by the PineConnector EA - to remove this restriction, turn Magic Restriction off in the EA.
- On — Hedging
- When a sell signal is received, open buy positions will be closed followed by a corresponding sell position opening, and vice-versa
- If you have 3 buy EURUSD positions open, an incoming sell EURUSD will result in the 3 buy EURUSD positions to close followed by the sell EURUSD opening
- On — Netting
- When a sell signal is received, open buy positions will be closed without opening a corresponding sell position, and vice-versa
- If you have 3 buy EURUSD positions open, an incoming sell EURUSD will result in the 3 buy EURUSD positions to close with no sell position opening
- Off
- Incoming buy and sell signals will not affect open positions
Shadow Targets
Hides your intended SL and TP targets.
- On
- Shadow Targets will be used whereby SL and TP will be arbitrarily placed 100 pips further than intended SL and TP prices
- Ensure both sl= and tp= present
- Off
- Incoming buy and sell signals will not affect open positions
- ATR Trailing
- Pips Trailing
- Breakeven
Partial Close Percentage
Determines the percentage of your positions to close when using the “closelongpct” and “closeshortpct” commands.
This EA option will only recognise positions opened by the PineConnector EA - to remove this restriction, turn Magic Restriction off in the EA.
- 25% — closes in 4 parts
- 34% — closes in 3 parts
- 50% — closes in 2 parts
The EA will automatically round the nearest volume permitted
- With Magic Restriction set to “On”, EA will only close positions opened by the PineConnector EA
- To close positions opened manually or by other EAs as well, set Magic Restriction option to “Off”
Max Open Positions
Defines the maximum number of positions.
This EA option will only recognise positions opened by the PineConnector EA - to remove this restriction, turn Magic Restriction off in the EA.
- 0 — EA does not limit open position count
- >0 — EA limits open position count accordingly
You may see the EA’s position count printed on the chart
- With Magic Restriction option set to “On”, only positions opened by the PineConnector EA will be counted
- To have the PineConnector EA count positions opened manually and by other EAs, turn Magic Restriction to “Off”
Max Open Positions per Symbol
Defines the maximum number of positions per symbol.
This EA option will only recognise positions opened by the PineConnector EA - to remove this restriction, turn Magic Restriction off in the EA.
- 0 — EA does not limit open position count per symbol
- >0 — EA limits open position count accordingly
- With Magic Restriction option set to “On”, only positions opened by the PineConnector EA will be counted
- To have the PineConnector EA count positions opened manually and by other EAs, turn Magic Restriction to “Off”
Dashboard
Profit Computation
Determines how profit is computed
- With Commission, Taxes and Swap
- Profit shown is comprehensive, where commission, taxes and swap is taken into account.
- Without Commission, Taxes and Swap
- Profit shown on your dashboard does not take into account commission, taxes and swap.
- Please note that the profit shown is likely to be higher when these additional costs are not factored in. This option should be primarily used for comparing trading accounts across different brokers with varying trading expenses.
Font Size
Determine the size of the texts and values in your dashboard
Any integer Example 10, 15, or 20
Show Dashboard
Determine whether the dashboard is displayed on the chart
On, and Off
Account Settings
This section will be useful when managing your capital, and for those who trade for prop firms such as FTMO.
Daily Profit
Determines the daily Account Take-Profit. The daily recompute will occur at midnight at GMT+0.
- 0 → Off
- Daily profit feature will be inactive
- 0 < x ≤ 1 → Percentage (%)
- Indicating 0.01 means you have a daily profit target of 1%
- If you starting balance of the day is $1000, your day’s profit target for the account is $1010
- Once your equity is ≥ $1010, the Action (1) will trigger
- More than 1 → Dollar ($)
- Indicating 100 means you have a daily profit target of $100
- If you starting balance of the day is $1000, your day’s profit target for the account is $1100
- Once your equity has increased by $100 or more, the Action (1) will trigger
Details? Experts Log. To check the day’s profit target, check your Experts Log
Daily Loss
Determines the daily Account Stop-Loss. The daily recompute will occur at midnight at GMT+0.
Options
- 0 → Off
- Daily loss feature will be inactive
- 0 < x ≤ 1 → Percentage (%)
- Indicating 0.01 means you have a daily loss tolerance of 1%
- Once your equity is ≤ to your daily loss tolerance, the Action (1) will trigger
- More than 1 → Dollar ($)
- Indicating 100 means you have a daily loss tolerance of $100
- Once your equity has decreased by $100 or more, the Action (1) will trigger
Action (1)
Determines the action when your daily Account TP or SL hits.
- Halt EA
- The PineConnector EA will be halted for the day, and will restart automatically on a new day
- Close All Positions
- All open market and pending orders will be closed
- Close All Positions and Halt EA
- All open market and pending orders will be closed and the PineConnector EA will halt for the day.
- With Magic Restriction set to “On”, EA will only close positions opened by the PineConnector EA
- To close positions opened manually or by other EAs as well, set Magic Restriction option to “Off”
Cumulative Profit
Cumulative profit is the total profit your account has earned (excluding deposits and credits) since inception.
Determines the cumulative Account Take-Profit.
- 0 → Off
- Cumulative profit feature will be inactive
- 0 < x ≤ 1 → Percentage (%)
- Indicating 0.25 means you have a cumulative profit target of 25%
- Once your equity is ≥ to your cumulative profit target, the Action (2) will trigger
- More than 1 → Dollar ($)
- Indicating 100 means you have a cumulative profit target of $100
- Once your equity has increased by $100 or more, the Action (2) will trigger
Cumulative Loss
Cumulative loss is the total loss your account has incurred (excluding deposits and credits) since inception.
Determines the daily Account Stop-Loss.
- 0 → Off
- Cumulative loss feature will be inactive
- 0 < x ≤ 1 → Percentage (%)
- Indicating 0.01 means you have a cumulative loss tolerance of 1%
- Once your equity is ≤ to your cumulative loss tolerance, the Action (2) will trigger
- More than 1 → Dollar ($)
- Indicating 100 means you have a cumulative loss tolerance of $100
- Once your equity has decreased by $100 or more, the Action (2) will trigger
Action (2)
Determines the action when your daily Account TP or SL hits.
- Halt EA (Day)
- The PineConnector EA will be halted for the day, and will restart automatically on a new day
- Halt EA (Persistent)
- The PineConnector EA will be halted for perpetually, until you resume the EA
- Press “resume PineConnector EA” button on the chart on your MT4/5
- Re-attach the PineConnector EA to your MT4/5 chart
- Send in a signal with the following syntax: “LicenseID,eaon,eaon”
- Close All Positions
- All open market and pending orders will be closed
- Close All Positions and Halt EA (Day)
- All open market and pending orders will be closed and the PineConnector EA will halt for the day.
- Close All Positions and Halt EA (Persistent)
- All open market and pending orders will be closed and the PineConnector EA will halt perpetually, until you resume the EA.
- With Magic Restriction set to “On”, EA will only close positions opened by the PineConnector EA
- To close positions opened manually or by other EAs as well, set Magic Restriction option to “Off”
Miscellaneous Settings
EA Magic Number
Determines the EA’s magic number.
Implementation This feature is useful if you’d like to run multiple strategies on the same timeframe and symbol.
- Strategy 1 → runs on License ID 1 with magic number 76 → opens and closes based on alerts of strategy 1
- Strategy 2 → runs on License ID 2 with magic number 77 → opens and closes based on alerts of strategy 2
While both strategies are run on the same Trading Account, the EA is behaving independently from the other — closing and managing positions it opens You may watch this YouTube video for the setup and showcase.
- 76
- 77
- 78
- 79
- 80
Magic Restriction
Determines how the EA views open positions and orders
- On
- Only positions created by the PineConnector EA will be affected.
- An incoming “closelong” command will only closed positions opened by the PineConnector EA
- Off
- All positions will be affected
- An incoming “closelong” command will close all positions with the same symbol
- Closing
- EA will now close positions opened manually and by other EAs
- Commands: closelong, closeshort, closelongvol, closeshortvol, closelongpct, closeshortpct
- Pyramiding
- EA will count and pull profit information of positions opened manually and by other EAs
- Difference: Counting of number of opened trades, and computation of Total Profit per Symbol
- Close on Reverse
- EA will execute Close on Reverse on positions opened manually and by other EAs
- Max Open Positions and Max Open Positions per Symbol
- Count → all positions, regardless of entry method, will now be counted
- Filter → only incoming signals from the PineConnector EA — entries by other EAs and manual entries are not filtered or stopped if Max Positions filter is breached
- SL and TP modifications
- EA will modify SL and TPs of positions opened manually and by other EAs
- Commands: newsltplong, newsltpshort, newsltpbuystop, newsltpsellstop, newsltpbuylimit, newsltpselllimit
Show Halt Button
Determines whether the EA halt button is printed on the chart.
- Off
- On
Broker Set
Changes some internal settings of the EA — do not change unless required. *Available on MT5 EAs only
- A (default)
- B — Unsupported Filling
- C — Brazilian Brokers
On-Chart Details
Determines the amount of EA and license details printed on the chart.
- Concise — only frequently used settings are printed
- Comprehensive — more EA settings are printed
- License only — only your license details will be printed
- Terminal — your terminal details will be printed
EA Active Hours
Have the PineConnector EA operate only on selected hours. The timezone based on broker time — refer to the chart to see the current broker time.
- Start*: 00:00 to 24:00
- End*: 00:00 to 24:00
*Start and End inputs are to be in the HH:MM
format
Examples
- 00:00 to 24:00 — EA always active
- 08:15 to 12:20 — EA will only process signals from 8.15am to 12.20pm
- 22:00 to 09:00 — EA will only process signals from 10pm to 9am the next day
Prefix, Suffix
Prefix adds to before your symbol, while Suffix adds to after your symbol
On this page
- PineConnector EA
- License ID
- Syntax Settings
- Target Type (sl=, tp=)
- Volume Type (risk=)
- Pending Order Entry (price=)
- Account Filter (accfilter=)
- EA Input
- Setting
- Stop Loss, Take Profit, Risk
- General Settings
- Pyramiding
- Close on Reverse
- Shadow Targets
- Partial Close Percentage
- Max Open Positions
- Max Open Positions per Symbol
- Dashboard
- Profit Computation
- Font Size
- Show Dashboard
- Account Settings
- Daily Profit
- Daily Loss
- Action (1)
- Cumulative Profit
- Cumulative Loss
- Action (2)
- Miscellaneous Settings
- EA Magic Number
- Magic Restriction
- Show Halt Button
- Broker Set
- On-Chart Details
- EA Active Hours
- Prefix, Suffix