Message structure
Section titled “Message structure”Keep this field order, separated by commas. Spaces around commas are optional. Use one License ID, command and symbol per message. Pine Script is the separate programming language that can generate these messages.
https://webhook.pineconnector.comPaste separately into TradingView’s Webhook URL field.
Illustrative requests, not executed trades. Paste one complete example into TradingView → Message. Replace LicenseID and the broker symbol, adapt the values, add your secret= if authentication is enabled, and test on demo. Check receipt and the actual account/order outcome separately.
Requests a 0.01-lot buy with a 20-pip stop and 40-pip target.
Targets a loss of 100 in account currency at the 20-pip stop. The stop is required for sizing; actual loss can differ.
Requests closure of matching EURUSD buys on every receiving account. Magic Restriction and supported comment filters determine eligible positions; manual trades can be in scope.
Use explicit units for new alerts. Choose one method per value. Explicit fields override corresponding legacy inputs, while other EA controls still apply. Omission does not establish a zero or default value; check receiving settings where no default is stated.
Volume
Section titled “Volume”Choose one method for each entry. Check the broker’s minimum, maximum and volume step.
| Method | Unit and requirement |
|---|---|
vol_lots= |
Fixed lots. 0.01 requests 0.01 lot. Stop distance does not size the position. |
vol_dollar= |
Cash loss budget, in account currency despite the name. 100 targets 100 at the stop. Requires one explicit stop in the same message. |
vol_pct_bal_loss= |
Percentage of balance to risk. 1 targets 1% of balance at the stop. Requires one explicit stop in the same message. |
vol_pct_eq_loss= |
Percentage of equity to risk. 1 targets 1% of equity at the stop. Requires one explicit stop in the same message. |
vol_pct_bal_margin= |
Percentage of balance as margin. 5 allocates 5% as margin; it does not limit loss to 5%. Stop distance is not used for sizing. |
For each loss-based method, supply one of sl_pips=, sl_price= or sl_pct=. Balance excludes floating profit/loss; equity includes it. With an illustrative USD 10,000 balance and USD 9,100 equity, 1% means USD 100 or USD 91 respectively. A 5% margin allocation means USD 500; resulting lots require the broker’s margin calculation and leverage.
With USD 10,000 balance, the loss budget is USD 100. Under the slider’s pip-value assumptions, a 20-pip stop gives 0.50 lots before broker rounding.
Uses current equity for the loss budget, including floating profit or loss. The stop remains required.
Allocates 5% of balance as margin. The stop does not determine its volume or cap realised loss.
Loss sizing: lots = budget ÷ (stop distance in pips × pip value per 1.00 lot). A price or percentage stop first supplies a price distance; divide it by the symbol’s pip size. Costs, gaps and fills can make realised loss exceed the budget.
Keep the planned loss at USD 100. Change the stop distance and see how the calculated lot size changes.
Stop distance · pips
- Planned loss
- USD 100
- vol_dollar=100
- Stop distance
- 20 pips
- Chosen for this example
- Calculated size
- 0.50 lots
- Before volume rounding
100 ÷ (20 × 10) = 0.5 lots.
Illustrative FX-5 EURUSD, USD account, 100,000 EUR contract and USD 10 per pip per lot; all calculated lots are before broker volume rounding. Real sizing uses broker contract details and volume limits; costs and execution can change the loss.
Calculated example; not an executed trade.
At 20 pips, USD 100 ÷ (20 × USD 10) = 0.50 lots. Doubling the stop to 40 pips halves the size to 0.25 lots. These are calculated requests before broker volume rounding.
With the USD 91 equity budget, the same calculation gives 0.455 lots. On a 0.01 volume step, do not assume 0.45 or 0.46: the EA’s rounding direction is unconfirmed. Find your account and broker inputs before adapting these calculations.
Stop loss
Section titled “Stop loss”Choose one stop method. On an entry, a buy SL is below the applicable entry price; a sell SL is above it. All three methods can supply the stop for loss-based volume.
| Method | Unit and example value |
|---|---|
sl_pips= |
Distance in PineConnector pips. 20 means entry minus 20 × pip size for a buy, plus that distance for a sell. |
sl_price= |
Absolute price. 1.09500 requests that level directly, without a distance calculation. |
sl_pct= |
Percentage of entry price. 1 means entry × 1% as the distance: subtract for a buy, add for a sell. It does not mean 1% account risk. |
One PineConnector pip = 10 symbol quoting points. Use the broker’s precision, not the asset name. This convention also applies to pip targets, pending entries, breakeven, trailing, ATR triggers and spread.
| Illustrative precision | Quoting Point → one pip | 20-pip price distance |
|---|---|---|
| Five decimals | 0.00001 → 0.00010 | 0.00200 |
| Three decimals | 0.001 → 0.010 | 0.200 |
| Two decimals | 0.01 → 0.10 | 2.00 |
Point and tick size differ: tick size sets tradable price increments. Prices must meet broker distance and tick rules; look them up in Specification. Account currency does not change these price distances when entry and pip size are fixed.
sl_pips=2020 × 0.00010 = 0.00200 price distancesl_price=1.09500Use the supplied level. No conversion.sl_pct=11.10000 × 1% = 0.01100 price distanceFrom a buy entry of 1.10000, sl_pips=20 requests 1.09800, sl_price=1.09500 requests 1.09500, and sl_pct=1 requests 1.08900. Vertical gaps use the same price scale. Pips convert as 20 × 0.00010 = 0.00200; percentage converts as 1.10000 × (1 ÷ 100) = 0.01100. The exact price uses the supplied level without conversion.
Calculated example; not an executed trade. These values illustrate units, not recommended stop distances.
Requests the supplied stop at 1.09500. It must be valid for the broker’s current quote, tick size and minimum distance.
Pending SL distances use the pending entry. Open-position modifications have a separate, unconfirmed relative-price basis; use their local guidance. Zero, negative and fractional explicit-stop handling is not established here. For manual breakeven, use the documented sl=0 exception.
Take profit
Section titled “Take profit”Choose one target method if adding a TP. A buy target is above the applicable entry; a sell target is below it. Use the same pip convention and broker constraints as Stop loss.
| Method | Unit and example value |
|---|---|
tp_pips= |
Pip distance. 40 means entry plus 40 × pip size for a buy, minus that distance for a sell. |
tp_price= |
Absolute price. 1.10400 requests that exact level. |
tp_pct= |
Percentage of entry price. 2 means entry × 2% as the distance: add for a buy, subtract for a sell. |
At an illustrative buy entry of 1.10000, the 2% target distance is 0.02200: TP 1.12200. The 1% SL is 1.08900. These percentages use price, not account balance.
Pending TP distances use the pending entry. Modifying open positions is a separate operation.
Open orders
Section titled “Open orders”Market commands
Section titled “Market commands”Include one volume method, plus a stop when required for sizing. Accepted aliases are case-insensitive.
| Command | Action and aliases |
|---|---|
buy |
Buy at market. Aliases: long, bull, bullish. |
sell |
Sell at market. Aliases: short, bear, bearish. |
The fixed-size starter is a complete market example. Receiving Pyramiding and Close on Reverse settings can affect an entry; check the EA configuration.
Pending commands
Section titled “Pending commands”Every pending order requires one entry method, one volume method and any stop required for sizing.
| Command | Requested entry side |
|---|---|
buystop |
Above market, buying after a rise. |
buylimit |
Below market, buying after a pullback. |
sellstop |
Below market, selling after a fall. |
selllimit |
Above market, selling after a rebound. |
| Entry method | Value supplied |
|---|---|
entry_pips= |
Positive pip distance from the current market reference. 20 means 20 × pip size. |
entry_price= |
Absolute entry price, such as 1.09500. Check the command’s side of market and broker price rules. |
entry_pct= |
Positive percentage of the current market reference. 1 means market reference × 1% as the distance. |
For relative entries, add the distance for buystop/selllimit; subtract it for buylimit/sellstop. Then measure relative SL/TP from the requested pending entry, including when modifying pending targets. An absolute price requires no conversion. The illustration omits spread; confirm actual quote-side and price handling on the receiving EA.
Requests a buy limit at 1.09500 and, with one pip = 0.00010, SL at 1.09300. The stop is measured from the requested entry.
With market reference 1.10000, the 1% offset requests entry at 1.11100. Its 20-pip stop requests 1.10900 under the five-decimal pip convention.
Choose an order type, then change its stop distance. The stop is measured from the requested entry level.
Price levels · entry_pips=20
- Market reference
- 1.10000
- Illustrative quote
- Buy limit entry
- 1.09800
- 20 pips below market
- Requested stop
- 1.09300
- 50 pips below the pending entry
1.09800 − 0.00500 = 1.09300.
Five-decimal EURUSD example; entry_pips=20 and 1 pip = 0.00010. These are requested levels. Actual fills, costs and stop execution can change the outcome.
Calculated example; not an executed trade.
At market reference 1.10000, a buy limit 20 pips below market requests 1.09800. Its illustrated 50-pip stop requests 1.09300. Measuring that stop from market instead would give 1.09500, only 30 pips below entry. A sell’s SL is above its pending entry.
Confirm explicit pending-method compatibility on older EAs; release dates do not establish a minimum build.
Close, cancel and modify
Section titled “Close, cancel and modify”Check accounts, then trades. One License ID can reach several accounts. Symbol commands select the exact broker symbol and stated direction. Magic Restriction determines whether management can include manual trades or other EAs. Supported comment= filters narrow the selection; omission can broaden it. Check what changed and what remained on every receiving account.
Close positions
Section titled “Close positions”| Command | Requested scope |
|---|---|
closelong |
Buy positions on the symbol. |
closeshort |
Sell positions on the symbol. |
closelongshort |
Both position directions on the symbol. |
closeall |
Positions and pending orders across the receiving EA’s scope. Third field: receiving EA chart symbol. This does not restrict closure to that symbol. |
Replace ChartSymbol with the receiving EA’s actual chart symbol. Requests closure of positions and cancellation of pending orders across its scope.
Partial closes
Section titled “Partial closes”| Commands | Quantity to close |
|---|---|
closelongpct, closeshortpct |
Buy/sell volume using the EA’s Partial Close Percentage, not a percentage supplied in the message. |
closelongvol, closeshortvol |
Buy/sell volume using required risk= as lots to close. This active exception is not entry-risk sizing; do not replace it with vol_lots=. |
If eligible buy volume is 0.04 lot and Partial Close Percentage is 25%, the requested reduction is 0.01 lot, leaving 0.03 if accepted. This illustration assumes 0.01-lot increments.
Requests a 0.01-lot reduction directly. Volume-close requests process available positions in order; an amount above available volume closes all available volume.
Exact ticket ordering, allocation and rounding between broker increments are unconfirmed; do not assume proportional reductions. Adding sl=0 requests conditional breakeven on the remainder.
Cancel pending orders
Section titled “Cancel pending orders”| Command | Requested scope |
|---|---|
cancellong |
Buy stops and buy limits on the symbol. |
cancelshort |
Sell stops and sell limits on the symbol. |
Cancels matching EURUSD buy pending orders. Already-open positions are outside this operation.
Modify open positions
Section titled “Modify open positions”| Command | Requested change |
|---|---|
newsltplong |
SL/TP on matching buy positions. |
newsltpshort |
SL/TP on matching sell positions. |
Include at least one stop or target, with one method per value. Absolute prices name the level directly. The reference price for pip/percentage modifications is unconfirmed here: check the installed EA’s rule, rather than borrowing an entry formula.
Requests SL 1.09800 and TP 1.10400 on matching buys; entry and lot volume stay unchanged. Adapt levels to actual broker quotes and permitted distances.
Manual breakeven
Section titled “Manual breakeven”Use sl=0, not sl_pips=0. The position must be in profit and far enough from entry for the broker to allow an entry-price stop. A rejected change can leave the old stop in place; inspect the result before retrying. This immediate request differs from automatic betrigger=/beoffset= management.
Requests SL at the matching buy’s entry price under those conditions. Check the actual stop and retained TP; entry and volume remain unchanged.
Modify pending orders
Section titled “Modify pending orders”| Command | Pending orders whose SL/TP changes |
|---|---|
newsltpbuystop |
Buy stops. |
newsltpbuylimit |
Buy limits. |
newsltpsellstop |
Sell stops. |
newsltpselllimit |
Sell limits. |
Include at least one stop or target. Relative pip/percentage SL/TP uses the pending entry, not current market. These commands leave the pending entry unchanged.
Requests a 20-pip SL below and 40-pip TP above each matching buy-stop entry. At entry 1.10200 with pip size 0.00010: SL 1.10000, TP 1.10600.
Combined close and open
Section titled “Combined close and open”The close applies within scope; the new market entry needs volume and any required stop. Aliases are case-insensitive.
| Command / alias | Close → new entry |
|---|---|
closelongopenlong / CL+OL |
Buys → buy. |
closelongopenshort / CL+OS |
Buys → sell. |
closeshortopenlong / CS+OL |
Sells → buy. |
closeshortopenshort / CS+OS |
Sells → sell. |
closelongshortopenlong / CLS+OL |
Both → buy. |
closelongshortopenshort / CLS+OS |
Both → sell. |
Requests closing matching buys, then a new 0.01-lot sell. Check both results; a combined message does not guarantee both actions complete.
Cancel and replace
Section titled “Cancel and replace”The replacement needs one entry method, volume and any required stop.
| Command | Cancel → new pending order |
|---|---|
cancellongbuystop |
Buy pending orders → buy stop. |
cancellongbuylimit |
Buy pending orders → buy limit. |
cancelshortsellstop |
Sell pending orders → sell stop. |
cancelshortselllimit |
Sell pending orders → sell limit. |
Requests cancellation of matching buy pending orders and a new buy stop. Inspect old orders and the replacement separately before deciding whether to retry.
Breakeven and trailing stops
Section titled “Breakeven and trailing stops”Add these groups when opening an entry. They do not replace volume or an initial stop required for loss-based sizing. Breakeven and pip-trailing distances use PineConnector pips, regardless of legacy Target Type. ATR uses the units in its table. Test interactions before combining stop managers.
Automatic breakeven: move the stop once
Section titled “Automatic breakeven: move the stop once”| Parameter | Unit and requirement |
|---|---|
betrigger= |
Favourable movement in pips. Above zero; requires beoffset=. |
beoffset= |
Stop offset from entry in pips. Requires betrigger=; smaller than its trigger. 0 requests entry price. Positive offsets are above a buy entry, below a sell entry. |
From buy entry 1.10000 and pip size 0.00010: at +8 pips retain the initial stop; at +10 request SL 1.10020; at +14 the breakeven level stays 1.10020. Assumes accepted changes.
Broker distance rules can reject the change. Entry-price breakeven does not guarantee zero net loss after costs or execution differences.
Pip trailing: tighten in steps
Section titled “Pip trailing: tighten in steps”| Parameter | Unit and requirement |
|---|---|
trailtrig= |
Activation movement in pips. Requires traildist= and trailstep=. Negative can request immediate activation; zero can depend on spread coverage. Confirm these boundaries on your EA. |
traildist= |
Distance from current price to trailing SL, in pips. Requires trailtrig= and trailstep=. Can add a stop on activation if none exists. |
trailstep= |
Further favourable pips needed for each tightening. Requires trailtrig= and traildist=. |
Buy SL trails below current price; sell SL trails above it. Fractional trailing values are rounded, but direction/tie handling is unconfirmed. The walkthrough uses positive whole numbers.
Configures a 12-pip trigger, 8-pip distance and 3-pip step, starting with a 20-pip SL. The sequence below illustrates requested changes.
- Trigger · 12 pips
- Distance · 8 pips
- Step · 3 pips
- Buy entry
- 1.100000 pips
- Price
- 1.100000 pips
- Stop request
- 1.09800−20 pips
This example starts with sl_pips=20. The initial stop stays in place until trailing activates.
Initial stop: 1.10000 − 0.00200 = 1.09800.
| Price from entry | Requested SL | What changes |
|---|---|---|
| 0 pips · 1.10000 | 1.09800 | This example starts with sl_pips=20. The initial stop stays in place until trailing activates. Initial stop: 1.10000 − 0.00200 = 1.09800. |
| +8 pips · 1.10080 | 1.09800 | The move is still below the trigger. The initial stop is unchanged. +8 is below the +12-pip trigger. |
| +12 pips · 1.10120 | 1.10040 | Request the first trailing adjustment: move the stop to 8 pips behind this price. 12 − 8 = +4 pips above entry. |
| +14 pips · 1.10140 | 1.10040 | Price has moved another 2 pips. The 3-pip step has not been reached, so the stop stays put. 14 − 12 = 2 pips; the next step is at +15. |
| +15 pips · 1.10150 | 1.10070 | Price has gained another 3 pips since the last adjustment. Request a higher stop. 15 − 8 = +7 pips above entry. |
| +13 pips · 1.10130 | 1.10070 | The stop stays at +7. A pullback does not move it down to maintain the original distance. Stop remains +7 pips; it does not loosen to +5. |
The stop moves towards profit, never away on a pullback. This example starts with a 20-pip SL and assumes the requested changes are accepted; spread and costs are omitted.
Illustrative prices · 1 pip = 0.00010 here. Real quotes and broker execution are not simulated.
Calculated example; not an executed trade.
ATR: convert the distance before placing the stop
Section titled “ATR: convert the distance before placing the stop”| Parameter | Unit and requirement |
|---|---|
atrtimeframe= |
Timeframe in minutes. Requires atrperiod=. MT4’s listed choices: 1, 5, 15, 30, 60, 240, 1440. Confirm other MT5 choices on your installed EA. |
atrperiod= |
Number of ATR periods, such as 14. Requires atrtimeframe=. |
atrmultiplier= |
Multiplier of ATR distance. Default 1. 2 doubles it. |
atrshift= |
ATR bar offset. Default 0. Exact closed-bar mapping needs version confirmation. |
atrtrigger= |
Favourable pip movement before activation. Default 0, described as immediate subject to initial-stop placement. |
ATR uses broker MetaTrader data, which can differ from TradingView, and updates at each bar close of the selected timeframe. Candidate buy SL = current price − ATR × multiplier; sell SL = current price + that distance. Convert ATR in pips to price units first. The reference describes adding a stop if absent; loss-based sizing still needs an explicit initial stop. Confirm your build’s rule before replacing an already tighter stop with a wider ATR candidate.
Configures ATR trailing on 60-minute broker data with period 14 and multiplier 2. For a sample ATR distance of 7 pips, the candidate distance is 14 pips; this does not predict the broker’s ATR series or an accepted stop.
Filters and identifiers
Section titled “Filters and identifiers”| Parameter | Meaning and limits |
|---|---|
spread= |
Maximum entry spread in pips; decimals supported. At arrival, (Ask − Bid) ÷ pip size ≤ the limit passes this filter only. 2 admits 1.2 or 2 pips, not 3.8. Other checks still apply. |
accfilter= |
Entry threshold under EA Account Filter Type/Basis: balance, equity, free margin (account currency) or margin percentage. 500 alone does not identify the metric. Equality/comparison is not confirmed for every setting; check the configured basis. |
comment= |
Strategy label, up to 20 characters. Spaces are supported; avoid commas, which separate fields. Exact matching is documented for closelong, closeshort, cancellong, cancelshort; do not assume partial-close/other command support. Special characters and overlength handling need version confirmation. Supported entries and versions. |
secret= |
Case-sensitive Signal Authentication key, required when enabled. Missing/different values prevent forwarding to the terminal. Saved License ID personalization does not supply it. Configure authentication. Never use a broker password or expose the real key in page copies/screenshots. |
Requests entry only when its arrival spread passes the 2-pip limit, alongside all other receiving checks.
Passes threshold 500 to the configured account metric. The current metric and its comparison rule are needed to determine pass/fail.
Labels the requested position Strategy A. Use the exact label with a supported comment-filtered closing or cancellation command.
Replace YOUR_SECRET_KEY privately with the configured key when authentication is enabled. This placeholder is not an authenticated request.
EA controls
Section titled “EA controls”| Command | Required third field and effect |
|---|---|
eaoff |
eaoff: halt incoming signal processing; does not request position closure. |
eaon |
eaon: resume a halted EA; does not request a new entry. Establish why it halted first. |
closealleaoff |
Receiving EA’s chart symbol: close positions/cancel pending orders within scope, then halt. |
Requests that the receiving EA halt incoming signal processing. Use LicenseID,eaon,eaon to request resumption; these third fields are command words, not broker symbols.
Replace ChartSymbol with the receiving EA’s chart symbol. Check the final positions, pending orders and halted state separately on all receiving accounts.
Older alerts
Section titled “Older alerts”Older alerts using risk=, sl=, tp= or pending=? See legacy syntax. Confirm the original units, receiving settings and version before changing them.
For every request, verify receipt, processing and the actual broker state. Follow the demo test workflow or troubleshoot a missing alert. Check existing orders before retrying an uncertain outcome.
Cheatsheet
Section titled “Cheatsheet”Open the full-width cheatsheet for a compact desktop view. All commands, parameters and aliases are also visible below.
Volume · choose one Source
| Command / parameter | Meaning / requirements |
|---|---|
vol_lots= | Fixed lots; stop-independent. |
vol_dollar= | Planned loss in account currency.* |
vol_pct_bal_loss= | % of balance as planned loss.* |
vol_pct_eq_loss= | % of equity as planned loss.* |
vol_pct_bal_margin= | % of balance as margin; not capped risk. Stop-independent. |
*Needs sl_pips=, sl_price= or sl_pct= in the same message. Costs/gaps/fills can exceed budget. Floating P/L: included in equity, excluded from balance.
Broker lot limits/step apply; rounding unconfirmed.
Stop loss & take profit Source
One method per SL/TP. Buy: SL below, TP above entry; sell: reverse.
| Command / parameter | Meaning / requirements |
|---|---|
sl_pips= / tp_pips= | Pip distance. |
sl_price= / tp_price= | Absolute price. |
sl_pct= / tp_pct= | % of entry price as distance; not account risk. |
TP source · Pending distances use pending entry; open-position modification basis is unconfirmed.
Pips & broker rules Source
1 PineConnector pip = 10 quoting points. Tick size is the separate tradable price increment.
| Decimals | Point | 1 pip | 20 pips |
|---|---|---|---|
| 5 | 0.00001 | 0.00010 | 0.00200 |
| 3 | 0.001 | 0.010 | 0.200 |
| 2 | 0.01 | 0.10 | 2.00 |
All pip fields follow broker precision, including BE/trailing, ATR triggers and spread. Check Specification for tick/distance rules. Currency-independent distances.
Explicit-stop zero/negative/fractional handling unconfirmed; manual BE uses sl=0.
Pending entry · choose one Source
| Command / parameter | Meaning / requirements |
|---|---|
entry_pips= | Positive pip distance from market reference. |
entry_price= | Absolute entry; obey market side/broker rules. |
entry_pct= | Positive % of market reference as distance. |
Add distance: buystop/selllimit. Subtract: buylimit/sellstop. Confirm quote-side handling and older-EA compatibility.
Market entries Source
All entries: volume + required sizing stop. Case-insensitive aliases.
| Command / parameter | Meaning / requirements |
|---|---|
buy / long / bull / bullish | Buy at market. |
sell / short / bear / bearish | Sell at market. |
Pyramiding and Close on Reverse apply.
Pending entries Source
Require entry method; relative SL/TP uses pending entry.
| Command / parameter | Meaning / requirements |
|---|---|
buystop | Buy above market. |
buylimit | Buy below market. |
sellstop | Sell below market. |
selllimit | Sell above market. |
Close → market entry Source
Close → enter. Volume + required sizing stop; case-insensitive aliases.
| Command / parameter | Meaning / requirements |
|---|---|
closelongopenlong / CL+OL | Buys → buy. |
closelongopenshort / CL+OS | Buys → sell. |
closeshortopenlong / CS+OL | Sells → buy. |
closeshortopenshort / CS+OS | Sells → sell. |
closelongshortopenlong / CLS+OL | Both → buy. |
closelongshortopenshort / CLS+OS | Both → sell. |
Both actions are not guaranteed to complete. Verify close and entry separately.
Cancel → pending entry Source
Require entry method + volume + sizing stop if needed.
| Command / parameter | Meaning / requirements |
|---|---|
cancellongbuystop | Buy pending → buy stop. |
cancellongbuylimit | Buy pending → buy limit. |
cancelshortsellstop | Sell pending → sell stop. |
cancelshortselllimit | Sell pending → sell limit. |
Check cancellation and replacement separately.
Modify pending SL/TP Source
| Command / parameter | Meaning / requirements |
|---|---|
newsltpbuystop | Buy stops. |
newsltpbuylimit | Buy limits. |
newsltpsellstop | Sell stops. |
newsltpselllimit | Sell limits. |
Supply ≥1 SL/TP. Relative pips/% uses pending entry; entry stays unchanged.
Management scope Source
One LicenseID may reach several accounts. Symbol commands select symbol/direction. Magic Restriction controls manual/other-EA eligibility; supported exact comment= filters narrow scope. Omission can broaden it.
Close positions Source
| Command / parameter | Meaning / requirements |
|---|---|
closelong | Buys on symbol. |
closeshort | Sells on symbol. |
closelongshort | Both directions on symbol. |
closeall | Positions + pending across EA scope. Third field = chart symbol; not symbol-limited. |
Partial closes Source
| Command / parameter | Meaning / requirements |
|---|---|
closelongpct / closeshortpct | Buy/sell reduction: EA Partial Close Percentage, not message %. |
closelongvol / closeshortvol | Buy/sell reduction: required risk= lots. |
risk= | Lots to close here; not entry risk or vol_lots=. |
Volume close processes positions in order; excess closes all available. Ticket order/allocation/rounding unconfirmed; not necessarily proportional. sl=0 adds conditional BE on remainder.
Cancel pending Source
| Command / parameter | Meaning / requirements |
|---|---|
cancellong | Buy stops + buy limits on symbol. |
cancelshort | Sell stops + sell limits on symbol. |
Open positions unaffected.
Modify open SL/TP Source
| Command / parameter | Meaning / requirements |
|---|---|
newsltplong | Matching buys. |
newsltpshort | Matching sells. |
Supply ≥1 SL/TP. Absolute prices name levels; pip/% basis unconfirmed, check EA. Entry/volume unchanged.
Manual breakeven Source
| Command / parameter | Meaning / requirements |
|---|---|
sl=0 | Entry-price SL via modification/partial close; not sl_pips=0. |
Requires profit + broker distance from entry. Rejection may retain old SL; check SL and retained TP before retrying.
EA controls · exact third field Source
| Command / parameter | Meaning / requirements |
|---|---|
eaoff | Third field eaoff: halt processing; no closure. |
eaon | Third field eaon: resume; no entry. Check why halted. |
closealleaoff | Third field = chart symbol: close positions/cancel pending in EA scope, then halt. Not symbol-limited. Verify each. |
Automatic breakeven Source
Both required. Add managers on entry; loss sizing still needs initial explicit SL. Test interactions.
| Command / parameter | Meaning / requirements |
|---|---|
betrigger= | Favourable pips; >0. |
beoffset= | Pips from entry; <trigger. 0 = entry; positive = above buy / below sell entry. |
Moves SL once; broker distance applies. BE does not guarantee zero net loss.
Pip trailing · all three required Source
| Command / parameter | Meaning / requirements |
|---|---|
trailtrig= | Activation pips; negative can start immediately, zero may depend on spread. Confirm boundaries. |
traildist= | Pips from current price to SL; can add absent SL on activation. |
trailstep= | Further favourable pips per tightening. |
Buy SL below/sell above price; never loosens on pullback. Fraction rounding direction/ties unconfirmed. BE/pip trailing ignore legacy Target Type.
ATR trailing Source
atrtimeframe= + atrperiod= both required.
| Command / parameter | Meaning / requirements |
|---|---|
atrtimeframe= | Minutes. MT4: 1, 5, 15, 30, 60, 240, 1440; confirm other MT5 choices. |
atrperiod= | ATR periods (e.g. 14). |
atrmultiplier= | Distance multiplier; default 1. |
atrshift= | Bar offset; default 0. Closed-bar mapping unconfirmed. |
atrtrigger= | Favourable pips; default 0 (immediate, subject to initial-SL placement). |
Broker MetaTrader data; updates each selected bar close. Candidate SL = current price ± ATR × multiplier (buy − / sell +); convert pip ATR to price first. Can add absent SL. Confirm tighter-stop handling before widening.
Filters & identifiers Source
| Command / parameter | Meaning / requirements |
|---|---|
spread= | Entry pips, decimals allowed: arrival (Ask − Bid) ÷ pip size ≤ limit. Other checks still apply. |
accfilter= | EA Account Filter Type/Basis threshold: balance/equity/free margin (account currency) or margin %. Confirm comparison/equality. |
comment= | Label ≤20 chars; spaces allowed, avoid commas. Exact filters only documented for closelong, closeshort, cancellong, cancelshort. Other support/limits unconfirmed. |
secret= | Case-sensitive; required if enabled. Missing/different key prevents forwarding. Not supplied by ID personalization. Setup. |
Complete illustrative requests Example guidance
Illustrations, not executed tests. Paste into TradingView → Message; replace LicenseID, symbol and values; add secret= privately if enabled (never a broker password). Demo-test; verify receipt, processing and resulting orders on every account.
LicenseID,buy,EURUSD,vol_lots=0.01,sl_pips=20,tp_pips=40LicenseID,closelongvol,EURUSD,risk=0.01LicenseID,eaoff,eaoff

