EA settings reference
Understand PineConnector's MetaTrader EA inputs, sizing, position behaviour, protection limits and connection settings.
Use this reference to understand the PineConnector Expert Advisor (EA) inputs in MetaTrader. Select the chart with the EA attached, press F7, and open Inputs.
You do not need to change every setting. Start with the setting that controls the behaviour you want, then test the change on a demo account.
- Your alert
Supplies the command and message values.
- The receiving EA
Applies its input sources, units and trading rules.
- Your broker
Accepts or rejects the resulting request under its trading conditions.
Find a setting
Section titled “Find a setting”| I want to change… | Go to |
|---|---|
| The connection’s destination ID | License ID |
| How a message’s size, stop or entry value is interpreted | Parameter interpretation |
| Whether the alert or EA supplies SL, TP and Risk | Signal or EA inputs |
| Repeated entries, reversals or position limits | Trading behaviour |
| What appears on the chart | Dashboard |
| Daily or cumulative profit/loss controls | Account protection |
| Which positions the EA can manage | Magic Number and Magic Restriction |
| Trading hours or broker symbols | Advanced and connection settings |
| Analytics, diagnostic logs or updates | Maintenance settings |
See the settings window from the published guide
EnlargeLicense ID
Section titled “License ID”Enter your PineConnector License ID from Portal Connections. The EA uses it to connect to PineConnector. Your alert messages must use the intended destination ID as well.
Do not use your broker’s account login in this field. If several accounts share the ID, alerts to that ID can reach all of them. See Account and licence questions.
Parameter interpretation
Section titled “Parameter interpretation”
EnlargeTarget Type
Section titled “Target Type”Controls sl= and tp=.
| Option | Meaning | Example |
|---|---|---|
| Pips — documented default | Distance from the entry price for a new order; the guide describes current market price for newsltp… modifications. |
For a EURUSD buy at 1.0567, sl=12 places the stop 12 pips below, at 1.0555. |
| Price | The exact target price. | sl=1.12345 requests a stop at 1.12345. |
| Percentage | Percentage distance from the entry price. | A buy at $20,000 with sl=1 places the stop 1% below: $20,000 − $200 = $19,800. |
For non-FX instruments, check how the EA and broker interpret a pip. Do not assume that sl=10 on an index means ten whole index points.
Volume Type
Section titled “Volume Type”Controls risk= and the order’s lot size.
| Option | How risk= is interpreted |
Stop loss needed for this calculation? |
|---|---|---|
| Lots — documented default | Direct lot size. risk=1 requests 1 lot. |
No |
| Dollar Amount | Cash loss amount in the account currency; the EA calculates volume using the stop distance. | Yes |
| Percentage of Balance, Lots | A balance-based lot calculation. The guide’s example: risk=1 gives 1 lot on a $10,000 balance, 0.1 lot on $1,000, or 10 lots on $100,000. |
No |
| Percentage of Balance, Margin | Margin to use as a percentage of balance. On a $1,000 balance, risk=1 targets approximately $10 of margin. |
No |
| Percentage of Balance, Loss | Loss at the stop as a percentage of balance. On a $1,000 balance, risk=1 represents a $10 risk amount. |
Yes |
| Percentage of Equity, Loss | Loss at the stop as a percentage of equity. On $1,000 equity, risk=1 represents a $10 risk amount. |
Yes |
For the loss-based modes, supply a stop loss through the source selected in Signal or EA inputs. The published examples use sl=. The calculation depends on that stop distance; a closer stop and a farther stop do not produce the same lot size for the same cash risk.
Example: with Dollar Amount selected, risk=10 on a USD account and a 15-pip stop is intended to size the position for approximately $10 loss at that stop. This is an estimate used for sizing, not a guaranteed maximum realised loss.
Pending Order Entry
Section titled “Pending Order Entry”Controls pending= for pending entries such as buylimit and sellstop.
| Option | Meaning | Buy-limit example |
|---|---|---|
| Pips from Current Market Price — documented default | Distance from the market price when the alert is processed. | EURUSD at 1.2468 with pending=8 requests 1.2460. |
| Specified Price from TradingView Alert | Exact entry price. | pending=1.2460 requests that price. |
| Percentage from Current Market Price | Percentage distance from the current market price. | $20,000 with pending=1 requests $19,800. |
Use a positive pending value. The order type determines the direction of the distance: a buy limit is below the market, while a buy stop is above it.
Stop-loss and take-profit placement for a pending order is relative to its pending entry, using the chosen Target Type. Exact-price pending entries also need to satisfy the broker’s price and minimum-distance rules.
Account Filter Basis
Section titled “Account Filter Basis”Controls the account metric checked by accfilter=. The published prose also calls this Account Filter Type.
| Basis | Example threshold |
|---|---|
| Balance | accfilter=1000: compare balance with a threshold of 1,000. |
| Equity | accfilter=1000: compare equity with a threshold of 1,000. |
| Free Margin | accfilter=1000: compare free margin with a threshold of 1,000. |
| Margin Percentage | accfilter=200: compare margin level with a threshold of 200%. |
Cash values use the account currency. Published references differ on whether a value exactly at the threshold passes. If that boundary matters, confirm the installed EA’s behavior with Support and a demo test, as described in the account-filter reference.
Margin-level display can be unusual when there are no open positions; confirm that case on your broker before relying on a margin-percentage filter.
Signal or EA inputs
Section titled “Signal or EA inputs”
EnlargeSetting
Section titled “Setting”| Option | SL and TP come from | Risk comes from |
|---|---|---|
| Signal Parameters Only | Alert message | Alert message |
| EA Parameters Only | EA input fields | EA input fields |
| SL/TP from EA, Risk from Signal | EA input fields | Alert message |
| SL/TP from Signal, Risk from EA | Alert message | EA input fields |
Stop Loss, Take Profit and Risk inputs
Section titled “Stop Loss, Take Profit and Risk inputs”Enter the values you want the EA to supply when the selected mode uses EA inputs. These can include decimal values. Interpret SL and TP using Target Type, and Risk using Volume Type.
One example across all four modes: assume the EA inputs are SL 10, TP 20, Risk 1, while the incoming message contains SL 15, TP 25, Risk 2.
| Selected mode | Values used |
|---|---|
| Signal Parameters Only | SL 15, TP 25, Risk 2 |
| EA Parameters Only | SL 10, TP 20, Risk 1 |
| SL/TP from EA, Risk from Signal | SL 10, TP 20, Risk 2 |
| SL/TP from Signal, Risk from EA | SL 15, TP 25, Risk 1 |
If a change to your alert appears to do nothing, check this setting before changing the message again. The relevant value may be coming from the EA instead.
Trading behaviour
Section titled “Trading behaviour”Position scope depends on Magic Restriction. With it off, several features can include positions opened manually or by other EAs.
EnlargePyramiding
Section titled “Pyramiding”Controls repeated entries for the same symbol and direction.
| Option | Behaviour described in the guide |
|---|---|
| On | New signals can open additional positions, subject to other limits and broker processing. |
| On — If Symbol & Direction in Profit | A new entry requires the combined existing positions for that symbol and direction to be in profit. |
| Off — Either 1 Buy OR 1 Sell | One position direction per symbol. An existing buy blocks another buy and also a sell. |
| Off — Only 1 Buy AND 1 Sell | Allows one buy and one sell on the symbol, but not a second position in either direction. |
Close on Reverse
Section titled “Close on Reverse”Controls what happens when a signal is opposite to positions already open on the symbol.
| Option | Existing opposite positions | New position from this signal |
|---|---|---|
| On — Hedging | Close them. | Open the new direction. |
| On — Netting | Close them. | Do not open the new direction. |
| Off | Leave them unaffected by this feature. | Process the entry under the other rules, including Pyramiding. |
For example, with three EURUSD buys open, an incoming sell under On — Hedging closes those buys and opens a sell. Under On — Netting, it closes them without opening the new sell.
These are EA option labels, not a statement that changing the option changes the broker account’s hedging/netting account type. For strategy-specific comments, see Keep strategies separate.
Shadow Targets
Section titled “Shadow Targets”Off uses normal broker stop-loss and take-profit targets. This is the documented default.
On sends more distant visible targets to the broker while the EA monitors the intended targets internally and closes when they are reached. The published guide requires both the intended SL and TP in the selected message or EA source.
Partial Close Percentage
Section titled “Partial Close Percentage”Sets the percentage used by closelongpct and closeshortpct.
The documented options are 10%, 20%, 25%, 34% and 50%. The guide describes the 34% option as approximately one third. Broker volume increments and minimum lot size affect the resulting close amount.
Check the closed volume and remaining position after a demo test. With Magic Restriction Off, a partial-close request can include positions opened manually or by other EAs, subject to broker rules.
Maximum Open Positions
Section titled “Maximum Open Positions”Limits the total open market positions across symbols for the EA’s applicable position scope. 0 means no limit from this setting; a positive value sets the limit.
Pending orders are not restricted by this setting in the published guide. Their later execution can take the account beyond the limit. Do not treat this as an account-wide cap enforced against every possible order source.
Maximum Open Positions per Symbol
Section titled “Maximum Open Positions per Symbol”Limits positions for each individual symbol. 0 disables the limit; a positive number enables it.
With Magic Restriction on, the guide counts the EA’s own matching positions. With it off, positions from other sources can count too. The filter controls new signals from this EA; it does not prevent a manual order or another EA from opening a position.
Maximum Unique Symbols
Section titled “Maximum Unique Symbols”Limits the number of distinct symbols represented by applicable open positions. 0 disables the limit.
For example, with a limit of 1, an existing EURUSD position means an entry for GBPUSD would introduce a second symbol and is blocked. Another EURUSD entry still needs to pass Pyramiding and the other position limits.
How limits combine: if Max Open Positions is 3, Max Open Positions per Symbol is 2, and Max Unique Symbols is 1, the tighter per-symbol rule still applies. Do not assume the total limit of 3 overrides the limit of 2 on the only permitted symbol.
Dashboard
Section titled “Dashboard”
EnlargeThese settings change the on-chart display.
| Setting | Options and effect |
|---|---|
| Profit Computation | With Commission, Taxes and Swap includes those costs and is the published default. Without Commission, Taxes and Swap omits them from the displayed profit. |
| Font Size | Sets the size of the displayed text and values. Choose a readable value for your screen; the guide gives 10, 15 and 20 as examples. |
| Show Dashboard | On shows the panel; Off hides it. On is the published default. |
EnlargeDisplay settings and available fields differ by EA version. Turning off the dashboard is not the same as turning off trading or analytics sharing.
Account protection
Section titled “Account protection”Daily and cumulative controls define a threshold and an action. Decide both: reaching a limit does not always mean every position closes, and closing positions does not always mean the EA stops accepting signals.
EnlargeDaily Timezone
Section titled “Daily Timezone”The published guide lists a numeric GMT offset, default 0, with a range from −12 to +14. Enter 8 for GMT+8 or -5 for GMT−5; do not enter a plus sign for positive values.
Confirm the reset boundary in your EA. The source describes a configurable daily timezone but also describes some resets as midnight GMT+0. Use the EA’s Experts log and your installed version’s behaviour to confirm the daily start/reset time before relying on a non-zero offset. Contact Support if those do not match your intended schedule.
Daily Profit and Daily Loss
Section titled “Daily Profit and Daily Loss”Set a daily gain target or loss threshold against the day’s starting balance. The guide uses these input ranges:
| Value | Interpretation |
|---|---|
0 |
Disabled. |
Greater than 0, up to and including 1 |
A proportion of the day’s starting balance. 0.01 means 1%. |
Greater than 1 |
A cash amount. |
For a starting balance of $10,000:
- Daily Profit
0.01or100: the illustrated trigger equity is $10,100. - Daily Loss
0.01or100: the illustrated trigger equity is $9,900.
Enlarge
EnlargeAction for daily limits
Section titled “Action for daily limits”| Option | Behaviour |
|---|---|
| Halt EA | Stops the EA for the trading day; it resumes at the next daily boundary. |
| Close All Positions | Requests closure of positions and pending orders covered by the action; the EA continues operating. |
| Close All Positions and Halt EA | Requests the closures and halts the EA for the day. |
Check both the final order state and the EA’s active/halted state. Confirm the applicable position scope and daily boundary on your version, especially if other EAs or manual trades share the account.
Cumulative Profit and Cumulative Loss
Section titled “Cumulative Profit and Cumulative Loss”These track profit or loss against a cumulative baseline, rather than a fresh baseline each day. The published guide describes the total since tracking began or was reset, excluding deposits and credits from cumulative profit.
| Value | Interpretation |
|---|---|
0 |
Disabled. |
Greater than 0, up to and including 1 |
Proportion of the initial/tracked balance. 0.25 means 25%; 0.10 means 10%. |
Greater than 1 |
Cash gain or loss amount. |
For example, a cumulative profit input of 1000 represents a cash gain threshold of 1,000, while a loss input of 0.10 represents a 10% threshold against the tracked base. Confirm the baseline and calculated values in Experts, especially after reattaching or restarting the EA.
Enlarge
EnlargeAction for cumulative limits
Section titled “Action for cumulative limits”| Option | Behaviour |
|---|---|
| Halt EA (Day) | Halts until the next daily boundary. |
| Halt EA (Persistent) | Remains halted until manually resumed. |
| Close All Positions | Requests closure; the EA continues unless another condition halts it. |
| Close All Positions and Halt EA (Day) | Requests closure and halts for the day. |
| Close All Positions and Halt EA (Persistent) | Requests closure and remains halted until manually resumed. |
Resume a persistently halted EA
Section titled “Resume a persistently halted EA”First establish why it halted and whether resuming is appropriate. The published guide lists these methods:
- Select Resume PineConnector EA on the chart, where that control is available.
- Reattach the PineConnector EA to the chart.
- Use the documented
eaoncommand from the syntax reference.
After resuming, check the EA state and its tracked limits before allowing more signals. Resuming operation is not the same as resolving the event that reached a protection threshold.
Advanced and connection settings
Section titled “Advanced and connection settings”
EnlargeMagic Number
Section titled “Magic Number”The Magic Number identifies positions opened by an EA instance. The published options are 76 (default), 77, 78, 79 and 80.
For a setup with separate EA instances on the same account, the guide illustrates assigning different magic numbers so each can recognise its own positions. This is distinct from filtering positions by comment= in the multi-strategy guide.
Magic Restriction
Section titled “Magic Restriction”| Option | Scope |
|---|---|
| On — documented default | Recognise/manage positions whose magic number matches this EA. |
| Off | Can recognise/manage positions for the symbol regardless of whether they were opened by this EA, another EA or manually. |
The guide lists closing commands, Pyramiding, Close on Reverse, position counts and SL/TP modifications as affected features. For example, a closelong request with restriction off can affect manual buy positions for the symbol too.
Broker Set
Section titled “Broker Set”| Option | Use described in the guide |
|---|---|
| Automatic — default | Normal automatic selection. |
| Set A | An alternate broker configuration; use only when directed for your issue. |
| Set B — Unsupported Filling | A configuration to try for unsupported order-filling errors. |
| Set C — Brazilian Brokers | Adjustments for the documented Brazilian-broker case. |
Do not cycle through these at random. Start with the full broker error and the error guide, or follow Support’s instruction for your account.
Active hours
Section titled “Active hours”Start Time and End Time restrict when the EA processes incoming signals. The time source is the broker’s server time shown on the chart, not necessarily your computer’s local time.
The guide uses HH:MM, including windows such as 08:15 to 12:20, or 22:00 to 09:00 across midnight. Outside the window, signals are ignored by this setting.
For an all-day setup, preserve the all-day values supported by your EA version. The published screenshot shows 00:00 to 24:00, while the prose describes a range ending at 23:59; confirm the accepted end value in your installed EA rather than assuming those endpoints are interchangeable.
These inputs are separate from Portal Trading Time Limit, which shows its own local timezone.
Symbol Prefix and Suffix
Section titled “Symbol Prefix and Suffix”Automatically add text before or after the symbol received in the alert.
| Incoming symbol | Prefix | Suffix | Result |
|---|---|---|---|
EURUSD |
broker. |
.mini |
broker.EURUSD.mini |
Use the exact symbol recognised by your broker. Check the final result if you also use Portal Symbol Mapping; do not assume that adding the same prefix in several places is harmless.
Maintenance settings
Section titled “Maintenance settings”DLL Logs
Section titled “DLL Logs”On enables detailed logs from the EA’s underlying DLL for diagnosis. Off is the published default. Turn this on when Support needs the additional diagnostic information; these logs are not the ordinary trade-verification checklist.
PineConnector Analytics
Section titled “PineConnector Analytics”On shares trading history for the Portal Analytics display. Off disables that sharing from the EA instance. On is the default in the documented supported MT5 versions. Follow the Analytics guide for compatibility, refreshing and opt-out steps.
Auto Update EA
Section titled “Auto Update EA”On is the published default and allows the EA to check for and download updated EA files. The guide describes checking when the EA initialises, such as on attachment or terminal startup. Off disables that automatic check/download behaviour.
Check the EA’s log and version after an update. A download message by itself is not confirmation that every running terminal is using the new version; use Portal Downloads and the applicable setup instructions if an update needs attention.
EnlargeEnable Symbols
Section titled “Enable Symbols”Controls which symbols are enabled when the EA is attached. The published options are:
- Yes — Auto-enable on trade — default.
- Yes — Enable all symbols.
- Yes — Enable up to 50 symbols.
- No — Hide all enabled symbols.
- No — Retain enabled symbols.
Choose according to the symbols you need visible and available. If a signal fails on a symbol, still check the broker’s exact symbol name and the actual error; visibility is only one part of the setup.
Check a setting change
Section titled “Check a setting change”Change one relevant setting at a time on a demo account, apply it, and send a test alert. Compare the actual account, symbol, direction, lot size, stop/target and position scope with your intention.
If the result differs, keep the full Experts message, EA version and the relevant input values. Use Errors for a recorded rejection or Missing signals to locate the stage where the instruction stopped.
