Structure only. The complete examples below supply a command and its values.
eaToken=YOUR_EA_TOKEN;command=Command;symbol=Symbol;volume=…;stopLoss=…;takeProfit=…;price=…;comment=…
| Field | Meaning |
|---|---|
| eaToken | Your EA Token from the ChartBridge Portal. Required. Every EA running with this token receives the message. |
| command | One command from the tables below, such as buy, sell or closelong. Lowercase and matched exactly. |
| symbol | The symbol to trade. Symbol Mapping in the Portal and the EA's prefix/suffix settings are applied before the EA looks it up. EA controls ignore it. |
| volume | Size of the entry. Its unit is set by the EA's Volume Type. |
| stopLoss | Stop loss. Its unit is set by the EA's Target Type. Omitted or 0 means no stop loss. |
| takeProfit | Take profit. Its unit is set by the EA's Target Type. Omitted or 0 means no take profit. |
| price | Entry for pending orders. Its unit is set by the EA's Pending Order Price Basis. |
| comment | Optional text saved as the trade's comment. |
Write each field as name=value and separate fields with a semicolon. Field order does not matter and spaces around values are trimmed. Field names are case-sensitive: write stopLoss, not stoploss. A value cannot contain a semicolon. Use one EA Token, command and symbol per message.
The message carries numbers only. The units come from the receiving EA's inputs, so the same message can mean different things on two EAs with different settings. Check the EA's Main Configuration before you send.
Pick a command, fill in the fields it needs, and copy the message into your TradingView alert.
eaToken=YOUR_EA_TOKEN;command=buy;symbol=EURUSD;volume=0.01;stopLoss=20;takeProfit=40https://tf.staging.chartbridge.com/webhookhttps://tf.staging.chartbridge.com/webhook
Paste separately into TradingView's Webhook URL field.
Illustrative requests, not executed trades. Paste one complete example into TradingView → Message. Replace YOUR_EA_TOKEN and the symbol, adapt the values and test on demo. Check receipt and the actual account/order outcome separately.
Buy a fixed size
eaToken=YOUR_EA_TOKEN;command=buy;symbol=EURUSD;volume=0.01;stopLoss=20;takeProfit=40
With Volume Type = Lots and Target Type = Pips, requests a 0.01-lot buy with a 20-pip stop and 40-pip target.
Close EURUSD buys
eaToken=YOUR_EA_TOKEN;command=closelong;symbol=EURUSD
Requests closure of EURUSD buys on every receiving EA. Power Mode determines eligible positions: Off limits it to the EA's own Magic Number; On includes manual trades and other EAs.
| EA input (Main Configuration) | Applies to | Options |
|---|---|---|
| Volume Type | volume | Lots, Dollar Amount, Percentage of Margin, Percentage of Balance, Percentage of Equity |
| Target Type | stopLoss, takeProfit | Pips, Price, Percentage |
| Pending Order Price Basis | price | Pips from market, Specified price, Percentage from market |
Trade Override can replace the message's values with the EA's own. Use Signal Parameters takes volume, stopLoss and takeProfit from the message. Use EA Parameters takes all three from the EA's Risk, Stop-Loss and Take-Profit Override inputs. The two mixed options take SL/TP from one side and volume from the other.
The EA rounds every calculated volume to the nearest volume step of the symbol. It does not adjust to the broker's minimum or maximum volume; the broker rejects a volume outside its limits.
| Volume Type | What volume means |
|---|---|
| Lots | Fixed lots. 0.01 requests 0.01 lot. The stop does not affect size. |
| Dollar Amount | Cash loss at the stop, in account currency despite the name. 100 targets 100 at the stop. Requires a stop loss. |
| Percentage of Margin | Percentage of free margin to lose at the stop. 1 targets 1% of free margin. Requires a stop loss. |
| Percentage of Balance | Percentage of balance to lose at the stop. 1 targets 1% of balance. Requires a stop loss. |
| Percentage of Equity | Percentage of equity to lose at the stop. 1 targets 1% of equity. Requires a stop loss. |
Every type other than Lots rejects a message with no stopLoss above 0 ("Stop Loss must be > 0"). Balance excludes floating profit/loss; equity includes it; free margin is equity minus margin in use. With an illustrative USD 10,000 balance and USD 9,100 equity, 1% means USD 100 or USD 91 respectively.
Choose a planned cash loss
eaToken=YOUR_EA_TOKEN;command=buy;symbol=EURUSD;volume=100;stopLoss=20
With Volume Type = Dollar Amount and Target Type = Pips, targets a loss of 100 in account currency at the 20-pip stop. Actual loss can differ.
Use balance for the risk amount
eaToken=YOUR_EA_TOKEN;command=sell;symbol=EURUSD;volume=1;stopLoss=20
With Volume Type = Percentage of Balance and Target Type = Pips, targets a loss of 1% of balance at the 20-pip stop.
Loss sizing: lots = budget ÷ (stop distance in pips × pip value per 1.00 lot). The EA reads pip value from the symbol's tick value and tick size. Costs, gaps and fills can make realised loss exceed the budget.
Pick a planned loss, then change the stop distance and see how the calculated lot size changes.
100 ÷ (18 × 10) ≈ 0.556 lots, which the EA rounds to 0.56 on a 0.01 volume step.
Doubling the stop from 18 to 36 pips halves the size from 0.56 to 0.28 lots (the hollow dot on the chart).
Illustrative FX-5 EURUSD, USD account, 100,000 EUR contract and USD 10 per pip per lot. 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.
Target Type sets the unit for both stopLoss and takeProfit. A buy SL is below entry and its TP above; a sell is the reverse. The EA measures from the entry price: the current Ask/Bid for a market order, the pending entry for a pending order, and the position's or order's open price when modifying.
| Target Type | Unit and example value |
|---|---|
| Pips | Distance in pips. stopLoss=20 means entry minus 20 pips for a buy, plus 20 pips for a sell. |
| Price | Absolute price. stopLoss=1.09500 requests that level directly. |
| Percentage | Percentage of entry price. stopLoss=1 means entry × 1% as the distance. It does not mean 1% account risk. |
A pip is the unit ChartBridge uses for pip distances. On most forex pairs, prices have 5 decimals and a pip is the 4th decimal; the 5th decimal is a tenth of a pip.
| Price move | Distance |
|---|---|
| 1.10000 → 1.10010 | 1 pip |
| 1.10000 → 1.10100 | 10 pips |
| 1.10000 → 1.10200 | 20 pips |
So stopLoss=20 on a EURUSD buy at 1.10000 puts the stop at 1.09800.
The pip depends on how many decimals your broker shows for the symbol, not on the asset name:
| Decimals on the price | Example price | 1 pip | 20 pips |
|---|---|---|---|
| 5 | 1.10000 | 0.0001 | 0.0020 |
| 3 (JPY pairs) | 150.000 | 0.01 | 0.20 |
| 2 (often gold) | 2000.00 | 0.10 | 2.00 |
Check the decimals for your symbol in MetaTrader 5's Market Watch (Ctrl + M). The same pip applies to pip-based pending entries.
Prices must meet broker stop-level and tick rules; the broker can reject a stop that is too close.
Illustrative entry · one price scale. Change each value and watch where the stop lands.
From a buy entry of 1.10000, a 20-pip stop requests 1.09800, a price stop of 1.09500 requests 1.09500, and a 1% stop requests 1.08900.
Calculated example; not an executed trade. These values illustrate units, not recommended stop distances.
Target by price percentage
eaToken=YOUR_EA_TOKEN;command=buy;symbol=EURUSD;volume=0.01;stopLoss=1;takeProfit=2
With Target Type = Percentage and 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.
Include volume, plus a stop loss when Volume Type needs one.
| Command | Action |
|---|---|
| buy | Buy at market. |
| sell | Sell at market. |
The EA's Max Positions, Max Positions per Symbol and Max Unique Symbols settings can reject a market entry; check the EA configuration.
Every pending order requires price above 0 and volume, plus a stop loss when Volume Type needs one. The EA's Max Pending Orders setting can also reject one.
| 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. |
| Pending Order Price Basis | What price means |
|---|---|
| Pips from market | Pip distance from market. 20 means 20 pips. |
| Specified price | Absolute entry price, such as 1.09500. Check the command's side of market. |
| Percentage from market | Percentage of market. 1 means market × 1% as the distance. |
For relative entries the market reference is Ask for buy orders and Bid for sell orders. The EA adds the distance for buystop/selllimit and subtracts it for buylimit/sellstop. Relative SL/TP is then measured from that pending entry.
Choose the entry price
eaToken=YOUR_EA_TOKEN;command=buylimit;symbol=EURUSD;volume=0.01;price=1.09500;stopLoss=20
With Pending Order Price Basis = Specified price and Target Type = Pips, requests a buy limit at 1.09500 and SL 20 pips lower at 1.09300.
Choose a percentage entry distance
eaToken=YOUR_EA_TOKEN;command=buystop;symbol=EURUSD;volume=0.01;price=1;stopLoss=20
With Pending Order Price Basis = Percentage from market, Target Type = Pips and Ask 1.10000, the 1% offset requests entry at 1.11100. Its 20-pip stop requests 1.10900.
Choose an order type, then change its stop distance. The stop is measured from the requested entry level.
1.09800 − 0.00500 = 1.09300
At market reference 1.10000, a buy limit 20 pips below market requests 1.09800. Its 50-pip stop requests 1.09300. Measuring that stop from market instead would give 1.09500, only 30 pips from entry. A buy's SL is below its pending entry.
Five-decimal EURUSD example; Pending Order Price Basis = Pips from market, Target Type = Pips, 1 pip = 0.0001. These are requested levels. Actual fills, costs and stop execution can change the outcome. Calculated example; not an executed trade.
Check accounts, then trades. One EA Token can reach several accounts. Symbol commands act only on the message's symbol and stated direction. Power Mode determines whether management can include manual trades or other EAs: Off limits it to the EA's own Magic Number; On includes everything on the account. Check what changed and what remained on every receiving account.
If Volume Type is not Lots, the EA runs its volume calculation on these commands too and rejects them without a stopLoss above 0. Keep Volume Type = Lots on EAs you manage with these commands, or include a stopLoss.
| Command | Requested scope |
|---|---|
| closelong | Buy positions on the symbol. |
| closeshort | Sell positions on the symbol. |
| closeall | Buy and sell positions on the symbol. Pending orders are left in place. |
To close every position and pending order on every symbol, use ceaseall under EA controls.
Close all on a symbol
eaToken=YOUR_EA_TOKEN;command=closeall;symbol=EURUSD
Requests closure of all EURUSD positions, buys and sells. EURUSD pending orders stay open; send cancelall to remove them.
| Command | Requested scope |
|---|---|
| closelongpct, closeshortpct | Each buy/sell position on the symbol is reduced by a percentage of its own volume. The EA's Partial Close Percentage Override decides the source: the EA's Partial Close Position Percentage, or the message's volume read as a percentage. |
| closelongvol, closeshortvol | Each buy/sell position on the symbol is reduced by the message's volume, in lots. |
Partial buy close
eaToken=YOUR_EA_TOKEN;command=closelongpct;symbol=EURUSD
If a buy position is 0.04 lot and the EA's Partial Close Position Percentage is 25%, the requested reduction is 0.01 lot, leaving 0.03 if accepted. Each matching position is reduced separately.
Close buy volume
eaToken=YOUR_EA_TOKEN;command=closelongvol;symbol=EURUSD;volume=0.01
Requests a 0.01-lot reduction from each EURUSD buy position. With three matching buys, up to 0.03 lot closes in total.
Partial Close Position Retry Count sets how many times the EA retries a rejected partial close.
| Command | Requested scope |
|---|---|
| cancelall | All pending orders on the symbol, buys and sells. |
| cancellong | Buy stops and buy limits on the symbol. |
| cancelshort | Sell stops and sell limits on the symbol. |
| cancellongbuystop | Buy stops on the symbol only. |
| cancellongbuylimit | Buy limits on the symbol only. |
| cancelshortsellstop | Sell stops on the symbol only. |
| cancelshortselllimit | Sell limits on the symbol only. |
Cancel commands never open a replacement order. To replace one, send the cancel command, then a separate pending-order message.
Cancel buy orders
eaToken=YOUR_EA_TOKEN;command=cancellong;symbol=EURUSD
Cancels EURUSD buy stops and buy limits. Already-open positions are outside this operation.
Cancel buy stops only
eaToken=YOUR_EA_TOKEN;command=cancellongbuystop;symbol=EURUSD
Cancels EURUSD buy stops; EURUSD buy limits stay in place.
| Command | Requested change |
|---|---|
| newsltplong | SL/TP on buy positions. |
| newsltpshort | SL/TP on sell positions. |
Send both stopLoss and takeProfit. Pips and percentage values are measured from each position's open price. An omitted or 0 value removes that level: sending only takeProfit clears the existing stop loss.
Buy stop and target
eaToken=YOUR_EA_TOKEN;command=newsltplong;symbol=EURUSD;stopLoss=1.09800;takeProfit=1.10400
With Target Type = Price, requests SL 1.09800 and TP 1.10400 on EURUSD buys; entry and lot volume stay unchanged. Adapt levels to actual broker quotes and permitted distances.
| Command | Pending orders whose SL/TP changes |
|---|---|
| newsltpbuystop | Buy stops. |
| newsltpbuylimit | Buy limits. |
| newsltpsellstop | Sell stops. |
| newsltpselllimit | Sell limits. |
Send stopLoss and takeProfit as for positions; an omitted or 0 value removes that level. The message's price is also applied as the order's entry, converted by Pending Order Price Basis, so include it. Relative SL/TP is measured from the order's entry.
Buy-stop targets
eaToken=YOUR_EA_TOKEN;command=newsltpbuystop;symbol=EURUSD;price=1.10200;stopLoss=20;takeProfit=40
With Pending Order Price Basis = Specified price and Target Type = Pips, keeps each EURUSD buy stop at 1.10200 and requests SL 1.10000 and TP 1.10600.
| Command | Close → new market entry |
|---|---|
| closelongbuy | Buys → new buy. |
| closeshortsell | Sells → new sell. |
These close every position in that direction on the symbol, then open one new position in the same direction. The new entry needs volume and, when Volume Type needs one, a stop loss. If any close fails, the EA does not open the new position.
Refresh a buy
eaToken=YOUR_EA_TOKEN;command=closelongbuy;symbol=EURUSD;volume=0.01;stopLoss=20
Requests closing EURUSD buys, then a new 0.01-lot buy. Check both results; a combined message does not guarantee both actions complete. To reverse direction instead, send closelong followed by a separate sell.
comment is saved on new positions and pending orders. Close, cancel and modify commands do not filter by it.
Label a strategy
eaToken=YOUR_EA_TOKEN;command=buy;symbol=EURUSD;volume=0.01;stopLoss=20;comment=Strategy A
Labels the requested position Strategy A for identification in MetaTrader and reports.
These act on the whole EA, not one symbol, and need no symbol field. They are accepted even while the EA is stopped.
| Command | Effect |
|---|---|
| eastop | Stop processing signals. Positions and orders stay open. Later trade messages are rejected with "EA is Paused" until eastart. |
| eastart | Resume a stopped EA. Does not open anything. Establish why it stopped first: Daily or Total Protection can also stop it. |
| ceaseall | Close all positions and cancel all pending orders on every symbol. The EA keeps running. |
| ceasealleastop | ceaseall, then stop the EA as eastop does. |
| eashutdown | Remove the EA from its chart. Positions and orders stay open. It does not come back with eastart; re-attach it in MetaTrader. |
| ceasealleashutdown | ceaseall, then remove the EA from its chart. |
If a Daily Profit or Daily Loss Limit is set, the EA also resumes at the start of the next broker day, even after eastop.
Power Mode sets the scope of ceaseall and its variants: Off limits them to the EA's own Magic Number; On includes manual trades and other EAs on the account.
Stop the EA
eaToken=YOUR_EA_TOKEN;command=eastop
Requests that the receiving EA stop processing trade signals. Send eaToken=YOUR_EA_TOKEN;command=eastart to resume.
Close everything and stop
eaToken=YOUR_EA_TOKEN;command=ceasealleastop
Requests closing every position and pending order in scope on all symbols, then stopping the EA. Check the final positions, pending orders and stopped state separately on all receiving accounts.
For every request, verify receipt, processing and the actual broker state. Check existing orders before retrying an uncertain outcome.
| Field | Unit set by |
|---|---|
| volume | Volume Type |
| stopLoss | Target Type |
| takeProfit | Target Type |
| price | Pending Order Price Basis |
| comment | Free text |
| Command | What it does | Needs |
|---|---|---|
| buy | Open a buy at market | symbol, volume |
| sell | Open a sell at market | symbol, volume |
| buystop | Place a buy stop above market | symbol, volume, price |
| buylimit | Place a buy limit below market | symbol, volume, price |
| sellstop | Place a sell stop below market | symbol, volume, price |
| selllimit | Place a sell limit above market | symbol, volume, price |
| closelong | Close buy positions on the symbol | symbol |
| closeshort | Close sell positions on the symbol | symbol |
| closeall | Close buy and sell positions on the symbol; pending orders stay | symbol |
| closelongbuy | Close buy positions, then open a new buy | symbol, volume |
| closeshortsell | Close sell positions, then open a new sell | symbol, volume |
| closelongpct | Reduce each buy position by a percentage | symbol; volume if % comes from signal |
| closeshortpct | Reduce each sell position by a percentage | symbol; volume if % comes from signal |
| closelongvol | Reduce each buy position by volume lots | symbol, volume |
| closeshortvol | Reduce each sell position by volume lots | symbol, volume |
| cancelall | Cancel all pending orders on the symbol | symbol |
| cancellong | Cancel buy stops and buy limits on the symbol | symbol |
| cancelshort | Cancel sell stops and sell limits on the symbol | symbol |
| cancellongbuystop | Cancel buy stops on the symbol | symbol |
| cancellongbuylimit | Cancel buy limits on the symbol | symbol |
| cancelshortsellstop | Cancel sell stops on the symbol | symbol |
| cancelshortselllimit | Cancel sell limits on the symbol | symbol |
| newsltplong | Set SL/TP on buy positions | symbol, stopLoss, takeProfit |
| newsltpshort | Set SL/TP on sell positions | symbol, stopLoss, takeProfit |
| newsltpbuystop | Set SL/TP and entry on buy stops | symbol, price, stopLoss, takeProfit |
| newsltpbuylimit | Set SL/TP and entry on buy limits | symbol, price, stopLoss, takeProfit |
| newsltpsellstop | Set SL/TP and entry on sell stops | symbol, price, stopLoss, takeProfit |
| newsltpselllimit | Set SL/TP and entry on sell limits | symbol, price, stopLoss, takeProfit |
| eastop | Stop processing signals; trades stay open | — |
| eastart | Resume a stopped EA | — |
| ceaseall | Close all positions and pending orders on every symbol | — |
| ceasealleastop | ceaseall, then stop the EA | — |
| eashutdown | Remove the EA from its chart; trades stay open | — |
| ceasealleashutdown | ceaseall, then remove the EA from its chart | — |