Keep strategies separate
Use matching comments on entries and closing messages to manage several strategies on one account.
Use comment= to label positions from different strategies on the same account. A supported closing command with the same comment can then target one strategy’s positions for a symbol.
This is useful when two strategies or timeframes trade the same instrument. A label such as strategy 1 tells their positions apart.
Before you begin
Section titled “Before you begin”The published guide documents comment-based filtering from MT4 EA v2.143 and MT5 EA v2.095. These version numbers describe comment filtering; confirm explicit-unit support separately before using the entry examples below. Check the behaviour on your installed version with a demo account before using it for live strategies.
The entry examples use vol_lots=0.01, explicitly requesting 0.01 lots, not 1% risk. Confirm that size is permitted for your demo symbol, or substitute a permitted demo size. These messages specify no SL or TP; check receiving settings for omitted targets. Explicit lots do not determine position scope or reversal behaviour.
Use your own License ID and exact case-sensitive broker symbol in the TradingView alert Message workflow. Check every account sharing that ID. Confirm Magic Restriction, Pyramiding for repeated entries, and Close on Reverse in the EA settings because those controls affect which positions are managed. For a new connection, start with Getting started and test your demo setup.
Apply EA input changes only to the receiving self-hosted terminal. On Edge, inspect Connections → account → EA settings; the hosted configuration is fixed and read-only. Ask Support if the displayed settings do not establish support for comment separation or the reversal workflow. Do not try to configure Edge by changing a local EA. If Signal Authentication is enabled, include your configured secret= privately in every entry and closing message.
Maintaining legacy messages: risk=0.01 is equivalent to vol_lots=0.01 for volume only when Volume Type = Lots and Setting takes Risk from the signal, such as Signal Parameters Only or SL/TP from EA, Risk from Signal. If Risk comes from the EA, risk=0.01 does not determine the size. Preserve the old behaviour only after checking Signal or EA inputs, version compatibility and a demo result; explicit units do not justify changing other settings.
1. Give each strategy a distinct comment
Section titled “1. Give each strategy a distinct comment”Choose a short, recognisable label and use it consistently. Comments are case-sensitive: strategy 1 and Strategy 1 are different labels.
The published guide supports comments on these entry commands:
| Entry type | Commands |
|---|---|
| Market orders | buy, sell |
| Limit orders | buylimit, selllimit |
| Stop orders | buystop, sellstop |
These two illustrative entry messages distinguish positions on the same symbol. Choose a permitted demo vol_lots= value before testing.
Expected requests: two 0.01-lot buys, one labelled strategy 1 and one labelled strategy 2, if both entry messages are sent at the illustrative size. Illustrative request; not an executed trade. Check: inspect the actual positions and confirm their comments and volumes before testing a closing instruction. Pyramiding and other receiving rules can affect whether an entry is accepted.
2. Use the same comment when closing
Section titled “2. Use the same comment when closing”The guide documents comment filtering for these commands:
| Command | Request |
|---|---|
closelong |
Close buy positions for the symbol and matching comment. |
closeshort |
Close sell positions for the symbol and matching comment. |
cancellong |
Cancel buy-stop and buy-limit orders for the symbol and matching comment. |
cancelshort |
Cancel sell-stop and sell-limit orders for the symbol and matching comment. |
For example, to close the buy positions labelled strategy 1:
This targets EURUSD buys with that exact comment. It does not request closing EURUSD sells, buys with another comment, or buys without a comment. Other EA scope rules still apply.
To target strategy 2, send its own labelled message:
Do not assume comment filtering applies to every closing command. The published multi-strategy guide does not establish it for partial-close commands such as closelongpct or closelongvol. Confirm the exact command and version before relying on that combination.
3. Decide how opposite signals should behave
Section titled “3. Decide how opposite signals should behave”If you use Close on Reverse → On — Hedging, the published example shows that an opposite entry with the same comment closes that strategy’s existing direction and opens the new direction.
For example, after the two buy entries above, this message is intended to reverse strategy 1 only:
In that example, the strategy 1 buy closes and a strategy 1 sell opens; the strategy 2 buy stays open. This depends on the documented On — Hedging behaviour. Read Close on Reverse before choosing a different option.
The new sell requests 0.01 lots at the illustrative size. Illustrative request; not an executed trade. On Edge, confirm that the hosted receiving configuration supports this exact reversal mode through the inspection/Support route above before relying on the example; explicit lots do not enable it.
Verify the separation
Section titled “Verify the separation”On a demo account, test both an entry and an exit for each strategy. Confirm:
- The comment matches exactly on the message and position.
- Only the intended symbol and direction are affected.
- The other strategy’s position remains as intended.
- The new order’s size matches the explicit
vol_lots=value, or the verified Volume Type and Risk source when maintaining legacy messages.
Compare the final TradingView message, PineConnector Signals log and broker positions/history. On Edge, select the instance in Portal → Edge → Experts / Journal using the hosted log walkthrough; on self-hosting, use local logs. If the outcome is unclear, inspect the broker account before resending. Pause the alert if separation differs from your intent. A website check is not a trade test.
If you run several EA instances on one account with different Magic Numbers, that is an additional method of separating position scope. See Magic Number and Magic Restriction; do not treat comments and magic numbers as interchangeable.
For one alert replicated across different accounts, use Multi-Instance Signals.
