Getting Started

FAQ

Expert Advisor

Expert Advisor

PineConnector EA

💡
Latest PineConnector Versions
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

💡
If you face bugs on the latest v3 EA, please report them via the Bug Report Form here.
💡
PineConnector Echo: Manual Trading Made Simple For manual traders, PineConnector Echo lets you execute buy and sell actions on TradingView and instantly mirrors them on your MetaTrader accounts. Stay in control of your trades without switching platforms.

Try PineConnector Echo →

💡
Keyboard Shortcut To access the EA settings in your MetaTrader terminal, press F7.

License ID

image

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

image

Target Type (sl=, tp=)

Determines how sl= and tp= targets are computed.

💡
Are you aware of the price discrepancy between TradingView and MetaTrader? Read more here.
💡
Options
  1. Pips
    1. If EURUSD is at 1.0567, going long/buy with “sl=12” will mean SL to be placed at 1.0555
    2. 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.
  2. Price
    1. “sl=1.12345” means SL to be placed at 1.12345
    2. 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.
  3. Percentage
    1. 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.

💡
Options
  1. Lots
    1. Indicating "risk=1" will mean 1 volume/lot will be opened
  2. Dollar Amount
    1. The amount that you will lose if your trade hits the specified SL
    2. 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
  3. Percentage of Balance, Lots
    1. Using “risk=1”,
      1. 0.1 lot will open on a $1000 account
      2. 1 lot will open on a $10,000 account
      3. 10 lots will open on a $100,000 account
    2. sl= syntax is not required
  4. Percentage of Balance, Margin
    1. If you set "risk=1" on a $1000 account, it means that opening a position will increase the margin by 1% or $10
  5. Percentage of Balance, Loss
    1. Using “risk=1” on a $1000 balance translates to you losing 1% or $10 if you were to hit SL
    2. sl= syntax is required
    3. Position size will be computed automatically based on the SL specified
  6. Percentage of Equity, Loss
    1. Using “risk=1” on a $1000 equity translates to you losing 1% or $10 if you were to hit SL
    2. sl= syntax is required
    3. 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.

💡
1. Positive Only Values for “price=” to always be positive; the EA will know whether to deduct or add from the current market price 2. Target Computation
  • 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
💡
Options
  1. Pips from Current Market Price
    1. With EURUSD at 1.2468, a buy limit with “price=8” will have the pending order entry price set at 1.2460
  2. Specified Price from TradingView Alert
    1. Indicating “price=1.2460” will set the pending order at exactly 1.2460
    2. 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.
  3. Percentage from Current Market Price
    1. 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.

💡
Options
  1. Balance
    1. Using “accfilter=1000”, the signal will only be processed if your account balance is more than $1000
  2. Equity
    1. Using “accfilter=1000”, the signal will only be processed if your account equity is more than $1000
  3. Free Margin
    1. Using “accfilter=1000”, the signal will only be processed if your free margin is more than $1000
  4. Margin Percentage
    1. Using “accfilter=200”, the signal will only be processed if your margin percentage is more than 200%
    2. With no open trades, your margin percentage will be 0 and your signal will be processed.

EA Input

image
💡
Input Computation The SL and TP will be calculated based on the Target Type option you select. The Risk calculation will be based on the Volume Type you choose.

Target Options (affecting both SL and TP)

  1. Pips (default)
  2. Percentage
  3. Price (not recommended)

Volume Options (affecting Risk)

  1. Lots (default)
  2. Dollar
  3. Percentage of Balance, Lots
  4. Percentage of Balance, Margin
  5. Percentage of Balance, Loss

Setting

Determines which values are used to process incoming signals.

💡
Options
  1. Signal Parameters Only
    1. EA input values for SL, TP, and risk are ignored.
    2. Signals will be processed according to your alert's parameters ("sl=", "tp=", and "risk=").
  2. EA Parameters Only
    1. EA input values specified in the EA are used for processing your signals.
    2. Signal parameters ("sl=", "tp=", and "risk=") are ignored.
    3. This option is ideal if you want to continually optimize your SL, TP, and risk without the need to modify all your alerts.
  3. SLTP from EA, Risk from Signal
    1. EA will utilise your SL and TP input values along with your signal’s risk parameter.
  4. SLTP from Signal, Risk from EA
    1. EA will utilise your SL and TP values from your alert message along with your EA’s risk input.
💡
Scenario 1 — Using Signal Parameters Assume you have chosen the “Use Signal Parameters, Ignore EA Inputs” setting, and you have the following inputs:
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.

💡
Scenario 2 — Using EA Inputs Assume you have chosen the “Use EA Inputs, Ignore Signal Parameters” setting, and you have the following inputs:
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.

💡
Scenario 3 — SLTP from EA, Risk from Signal Assume you have chosen the “SLTP from EA, Risk from Signal” setting, and you have the following inputs:
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.

💡
Scenario 4 — SLTP from Signal, Risk from EA Assume you have chosen the “SLTP from Signal, Risk from EA” setting, and you have the following inputs:
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

💡
Options Any number such as 0.1, 10, and 10.123.

General Settings

image

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.

💡
Options
  1. On
    1. All incoming trades will open without restrictions
  2. On — If symbol & direction in profit
    1. An incoming buy EURUSD will only open if summation of all buy EURUSDs has a profit of more than $0
  3. Off — Either 1 Buy OR 1 Sell
    1. If you already have 1 buy EURUSD, the sell EURUSD will not open
    2. If you already have 1 buy EURUSD, the next buy EURUSD will not open
  4. Off — Only 1 Buy AND 1 Sell
    1. If you already have 1 buy EURUSD, the sell EURUSD will open
    2. 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.

💡
Options
  1. On — Hedging
    1. When a sell signal is received, open buy positions will be closed followed by a corresponding sell position opening, and vice-versa
    2. 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
  2. On — Netting
    1. When a sell signal is received, open buy positions will be closed without opening a corresponding sell position, and vice-versa
    2. 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
  3. Off
    1. Incoming buy and sell signals will not affect open positions

Shadow Targets

Hides your intended SL and TP targets.

💡
Options
  1. On
    1. Shadow Targets will be used whereby SL and TP will be arbitrarily placed 100 pips further than intended SL and TP prices
    2. Ensure both sl= and tp= present
  2. Off
    1. Incoming buy and sell signals will not affect open positions
💡
Vanilla Positions If you intend to use Shadow Targets, please note that it will not work with other features listed below:
  • 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.

💡
Options
  1. 25% — closes in 4 parts
  2. 34% — closes in 3 parts
  3. 50% — closes in 2 parts

The EA will automatically round the nearest volume permitted

💡
Closing
  • 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.

💡
Options
  1. 0 — EA does not limit open position count
  2. >0 — EA limits open position count accordingly

You may see the EA’s position count printed on the chart

💡
Counting
  • 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.

💡
Options
  1. 0 — EA does not limit open position count per symbol
  2. >0 — EA limits open position count accordingly
💡
Counting
  • 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

image
A snapshot of the Trading Performance Dashboard
A snapshot of the Trading Performance Dashboard

Profit Computation

Determines how profit is computed

💡
Options
  1. With Commission, Taxes and Swap
    1. Profit shown is comprehensive, where commission, taxes and swap is taken into account.
  2. Without Commission, Taxes and Swap
    1. Profit shown on your dashboard does not take into account commission, taxes and swap.
    2. 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

💡
Options

Any integer Example 10, 15, or 20

Show Dashboard

Determine whether the dashboard is displayed on the chart

💡
Options

On, and Off

Account Settings

image

This section will be useful when managing your capital, and for those who trade for prop firms such as FTMO.

💡
Be Safe Than Sorry Use a smaller value for your Daily Loss and Cumulative loss than your intended tolerance
Protect your capital with the Daily Loss and Cumulative Loss features
Protect your capital with the Daily Loss and Cumulative Loss features

Daily Profit

Determines the daily Account Take-Profit. The daily recompute will occur at midnight at GMT+0.

💡
Options
  1. 0 → Off
    1. Daily profit feature will be inactive
  2. 0 < x ≤ 1 → Percentage (%)
    1. Indicating 0.01 means you have a daily profit target of 1%
    2. If you starting balance of the day is $1000, your day’s profit target for the account is $1010
    3. Once your equity is ≥ $1010, the Action (1) will trigger
  3. More than 1 → Dollar ($)
    1. Indicating 100 means you have a daily profit target of $100
    2. If you starting balance of the day is $1000, your day’s profit target for the account is $1100
    3. 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

image

Daily Loss

Determines the daily Account Stop-Loss. The daily recompute will occur at midnight at GMT+0.

💡

Options

  1. 0 → Off
    1. Daily loss feature will be inactive
  2. 0 < x ≤ 1 → Percentage (%)
    1. Indicating 0.01 means you have a daily loss tolerance of 1%
    2. Once your equity is ≤ to your daily loss tolerance, the Action (1) will trigger
  3. More than 1 → Dollar ($)
    1. Indicating 100 means you have a daily loss tolerance of $100
    2. Once your equity has decreased by $100 or more, the Action (1) will trigger
💡
Details? Experts Log. To check the day’s loss tolerance, check your Experts Log.
image

Action (1)

Determines the action when your daily Account TP or SL hits.

💡
Options
  1. Halt EA
    1. The PineConnector EA will be halted for the day, and will restart automatically on a new day
  2. Close All Positions
    1. All open market and pending orders will be closed
  3. Close All Positions and Halt EA
    1. All open market and pending orders will be closed and the PineConnector EA will halt for the day.
💡
Closing
  • 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.

💡
Options
  1. 0 → Off
    1. Cumulative profit feature will be inactive
  2. 0 < x ≤ 1 → Percentage (%)
    1. Indicating 0.25 means you have a cumulative profit target of 25%
    2. Once your equity is ≥ to your cumulative profit target, the Action (2) will trigger
  3. More than 1 → Dollar ($)
    1. Indicating 100 means you have a cumulative profit target of $100
    2. Once your equity has increased by $100 or more, the Action (2) will trigger
💡
Details? Experts Log. To check your cumulative value, check your Experts Log.
image

Cumulative Loss

💡

Cumulative loss is the total loss your account has incurred (excluding deposits and credits) since inception.

Determines the daily Account Stop-Loss.

💡
Options
  1. 0 → Off
    1. Cumulative loss feature will be inactive
  2. 0 < x ≤ 1 → Percentage (%)
    1. Indicating 0.01 means you have a cumulative loss tolerance of 1%
    2. Once your equity is ≤ to your cumulative loss tolerance, the Action (2) will trigger
  3. More than 1 → Dollar ($)
    1. Indicating 100 means you have a cumulative loss tolerance of $100
    2. Once your equity has decreased by $100 or more, the Action (2) will trigger
💡
Details? Experts Log. To check your cumulative value, check your Experts Log.
image

Action (2)

Determines the action when your daily Account TP or SL hits.

💡
Options
  1. Halt EA (Day)
    1. The PineConnector EA will be halted for the day, and will restart automatically on a new day
  2. Halt EA (Persistent)
    1. The PineConnector EA will be halted for perpetually, until you resume the EA
💡
Resuming 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”
  1. Close All Positions
    1. All open market and pending orders will be closed
  2. Close All Positions and Halt EA (Day)
    1. All open market and pending orders will be closed and the PineConnector EA will halt for the day.
  3. Close All Positions and Halt EA (Persistent)
    1. All open market and pending orders will be closed and the PineConnector EA will halt perpetually, until you resume the EA.
💡
Closing
  • 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

image

EA Magic Number

Determines the EA’s magic number.

💡
Multi-Strategy This feature is useful if you’d like to run multiple strategies on the same timeframe and symbol.

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.

💡
Options
  1. 76
  2. 77
  3. 78
  4. 79
  5. 80

Magic Restriction

Determines how the EA views open positions and orders

💡
Options
  1. On
    1. Only positions created by the PineConnector EA will be affected.
    2. An incoming “closelong” command will only closed positions opened by the PineConnector EA
  2. Off
    1. All positions will be affected
    2. An incoming “closelong” command will close all positions with the same symbol
💡
List of Affected Features
  1. Closing
    1. EA will now close positions opened manually and by other EAs
    2. Commands: closelong, closeshort, closelongvol, closeshortvol, closelongpct, closeshortpct
  2. Pyramiding
    1. EA will count and pull profit information of positions opened manually and by other EAs
    2. Difference: Counting of number of opened trades, and computation of Total Profit per Symbol
  3. Close on Reverse
    1. EA will execute Close on Reverse on positions opened manually and by other EAs
  4. Max Open Positions and Max Open Positions per Symbol
    1. Count → all positions, regardless of entry method, will now be counted
    2. 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
  5. SL and TP modifications
    1. EA will modify SL and TPs of positions opened manually and by other EAs
    2. Commands: newsltplong, newsltpshort, newsltpbuystop, newsltpsellstop, newsltpbuylimit, newsltpselllimit

Show Halt Button

Determines whether the EA halt button is printed on the chart.

💡
Options
  1. Off
  2. On

Broker Set

Changes some internal settings of the EA — do not change unless required. *Available on MT5 EAs only

💡
Options
  1. A (default)
  2. B — Unsupported Filling
  3. C — Brazilian Brokers

On-Chart Details

Determines the amount of EA and license details printed on the chart.

💡
Options
  1. Concise — only frequently used settings are printed
  2. image
  3. Comprehensive — more EA settings are printed
  4. image
  5. License only — only your license details will be printed
  6. image
  7. Terminal — your terminal details will be printed
  8. image

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.

💡
Options
  1. Start*: 00:00 to 24:00
  2. End*: 00:00 to 24:00

*Start and End inputs are to be in the HH:MM format

Examples

  1. 00:00 to 24:00 — EA always active
  2. 08:15 to 12:20 — EA will only process signals from 8.15am to 12.20pm
  3. 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

💡
Options Any string such as .mini Example Prefix of “broker.” and suffix of “.mini”. Sending in “EURUSD” will have the EA convert the symbol as “broker.EURUSD.mini”