Open Portal

Multiple Strategies

Run several strategies on one trading account without them interfering. How the comment parameter groups trades and which EA features it scopes.

One trading account can run as many strategies as you like at the same time, and TradeSgnl will keep them from interfering with each other. What makes that work is the comment= parameter.

comment= is the most important optional parameter in a TradeSgnl signal. It is not a note or a label. It is the key TradeSgnl uses to group your trades into a strategy, and almost every advanced feature operates on that group rather than on individual trades.

One line summary

Trades on the same symbol that share a comment are one strategy. Different comments, or the same comment on a different symbol, are separate strategies that never interfere with each other. Trades with no comment fall into one unnamed strategy per symbol.

Why the comment matters

Without a comment, every trade on a symbol lands in one shared bucket. A close signal from strategy A closes strategy B's positions. Pyramid targets are calculated across unrelated trades. Direction Lock rejects a valid short because an unrelated long is open.

Give each strategy its own comment and all of that isolation happens automatically.

Grouping

Trades sharing a symbol and comment are managed as one coordinated position: shared pyramid target, shared hedge decision, shared level counter.

Filtering

Close, partial close, reversal, and cancel actions only touch positions whose comment matches the one in the signal.

Isolation

Multiple strategies run on one account and one EA instance without stepping on each other.

Setting the comment

In the Syntax Generator, fill the Comment field at the top of the form next to License and Symbol. It is written into every signal the generator produces.

Open the Syntax Generator guide

By hand, add comment= anywhere in the parameter list:

LicenseID,EURUSD,buy,risk=0.01,sl=50,tp=100,comment=TrendStrategy

Naming rules

RuleWhy
Matching is exact and case sensitiveTrendStrategy and trendstrategy are two different strategies. A stray space or a typo silently creates a second group.
Spaces at the start and end are ignored, spaces inside countMy Strategy and MyStrategy are two different strategies. A comment cannot contain a comma, because commas separate the parameters.
Keep it to 31 characters or fewerThat is MT5's limit on order comments. The REST API accepts 1 to 31 characters: letters, digits, space, _ and -. A longer comment can split a strategy in two if the EA has to rebuild its groups (see Restarts and comments).
Avoid _Hedge and RecoveryBoth are reserved. The EA appends _Hedge to hedge positions and Recovery to recovery positions, and it skips any group whose comment contains either string when deciding whether to open a hedge. A comment like Recovery_Grid will never be hedge protected.

Restarts and comments

The EA keeps its own record of every trade's comment, saved on the computer running MT5 within a second of each change. It matches closes and modifies against that record, not against the comment the broker shows. So a strategy stays together through an EA restart, a terminal restart, a partial close, and a broker that clears or rewrites the comment.

Only when that record is not available (MT5 moved to a different computer, or a fresh Windows user) does the EA rebuild its groups from open positions, reading the comment the broker stored on the opening order. A comment longer than 31 characters comes back cut short in that case, which is the one way a group can split, so keep comments within 31 characters.

After such a rebuild, each position keeps the stop loss and take profit set at the broker. A multi-level take profit ladder and per-signal trailing or breakeven settings are not restored, and the EA's own input settings apply instead.

The symbol is part of the key

A strategy group is identified by symbol plus comment, not by the comment on its own. Running comment=Scalper on both EURUSD and GBPUSD gives you two independent groups: separate pyramid targets, separate level counters, separate hedge decisions, and a EURUSD close signal never touches the GBPUSD positions.

That means reusing one comment across symbols is safe. Distinct names per symbol, such as Scalper_EU and Scalper_GU, are still worth using when you want to tell the two apart at a glance in your trading platform and in the Analytics dashboard.

Older EA builds

EA versions before 0.64 keyed strategy groups on the comment alone, so the same comment on two symbols merged into one group with targets computed from whichever symbol opened first. If you are on an older build, keep comments unique per symbol until you update.

What the comment controls

FeatureHow the comment is used
Pyramid TradingDefines the group. Combined breakeven, shared profit target, pyramid trailing, level counter, and per level trade limits are all calculated per comment.
Direction LockPrevents mixing buy and sell inside one comment group. Trades under a different comment are unaffected, and the filter only acts on pyramid-managed strategies.
DCA FilterCompares a new entry against the last entry in the same comment group. Also pyramid-managed strategies only.
Hedge ProtectionLoss thresholds are evaluated per comment group, and the hedge position is opened with YourComment_Hedge.
Recovery SystemRecovery trades are opened with YourComment Recovery so they stay identifiable and are excluded from hedging.
closebuy, closesell, closeallOnly positions matching both the symbol and the comment are closed. Omit the comment and every position on that symbol in that direction closes, regardless of which strategy opened it.
Partial close (pct=, pct_lots=, pct_percent=)Same filtering. Remaining positions stay in their strategy, even on brokers that clear the comment after a partial close, so repeated partial closes and a later closeall stay on target.
Reversals (closelongbuy, closeshortsell, and the rest)The close half is comment filtered, then the new entry is opened under the same comment.
cancellong, cancelshortOnly pending orders with the matching comment are cancelled.
exop and exentOpposite positions are looked up within the symbol and comment before deciding to close or flip.
noexitApplied per strategy at the server. Other strategies on the same license still process their exit signals normally.
Analytics and BacktestingTrades are grouped by comment so you can compare strategies side by side.

A close signal with no comment is not scoped

LicenseID,EURUSD,closebuy closes every buy on EURUSD across all your strategies. Always include the comment in exit signals if the account runs more than one strategy.

A close or modify with a comment acts only on positions carrying exactly that comment. If several open trades share a comment, all of them are affected, and the delivery note gives the count. To close or modify one trade on its own, give each trade its own comment, or name it with ticket=. See Target One Trade by Ticket.

Sticky group settings and per signal settings

This is where most confusion starts. Some signal parameters apply only to the trade that carries them. Others are read once, when the strategy group is created, and then govern the whole group until it closes.

ParameterScopeRead when
pyWhole group, stickyOnly on the signal that creates the group. Ignored on every later signal for that comment.
rePer tradeEvery signal. Only trades carrying re get recovery.
exop, exent, noexitPer signalEvery signal.
sl=, tp=, tp1=, pct=, trailing, breakevenPer tradeEvery signal.

Why py is sticky

When a signal arrives, the EA checks whether a strategy group with that comment already exists.

  • No group exists. This signal creates it. In Signal mode, the presence of py decides whether the group is pyramid managed, and the pyramid target, level size, and trade limit are copied from the EA inputs into the group at that moment.
  • A group already exists. The py flag is not read at all. The trade is added to the existing group and inherits whatever the group was created with.

The consequence: removing py from your alert does not turn pyramid management off for a strategy that is already running. The setting is stamped on the group, not on the signal. Adding py to a group that was created without it does nothing either.

How to actually turn pyramid off for a strategy

Close every trade in that comment group. The group is deleted when its last position closes, and the next signal with that comment creates a fresh group that re-reads the py flag. If you need the change to take effect without closing positions, send the new trades under a different comment instead.

Pyramid mode: Enabled versus Signal

The EA input Pyramid Management has three modes, and the difference between the last two is exactly this stamping behaviour.

ModeWhat happens on a new groupDoes py matter?
DisabledNo group is ever pyramid managed.No. py is ignored entirely.
EnabledEvery new group is pyramid managed, automatically.No. py is ignored, because every group already qualifies.
SignalA new group is pyramid managed only if its first signal carried py.Yes, but only on the first signal for that comment.

Use Enabled when every strategy on the terminal should pyramid. Use Signal when you want to pick which strategies pyramid and control it from the alert message.

If the EA loses its saved state files and has to rebuild groups from open positions after a restart, it cannot know which signals carried py. Rebuilt groups are treated as pyramid managed whenever Pyramid Management is Enabled or Signal.

Group lifecycle

Created. The first trade with a new comment creates the strategy group. Pyramid on or off, the pyramid target, level size, and per level trade limit are all fixed at this moment from the EA inputs.

Grows. Later trades with the same comment join the group. Once the group holds two or more trades and has a pyramid target, individual take profits are removed and replaced by the shared strategy target.

Shrinks. Closing individual trades removes them from the group. The rest of the group keeps its settings.

Deleted. When the last position in the group closes, the group is removed along with its chart target line. The stamped settings are gone.

Recreated. The next signal with that comment starts over at step 1 and re-reads py.

Worked example

Pyramid Management is set to Signal. Pyramid Target is 50 pips.

#SignalWhat the EA does
1...,buy,risk=0.01,tp=100,comment=Trend,pyNo Trend group exists, so one is created. py is present, so the group is pyramid managed with a 50 pip target.
2...,buy,risk=0.01,tp=100,comment=TrendTrend exists. py is not read. The trade joins the group. Both trades now share the 50 pip strategy target and their individual take profits are dropped.
3...,buy,risk=0.01,tp=100,comment=TrendSame again. Still pyramid managed. Dropping py changed nothing.
4...,buy,risk=0.01,tp=100,comment=Trend2A different comment, so a brand new group. No py, so Trend2 is not pyramid managed and keeps its own 100 pip take profit per trade.
5Strategy target hit, all Trend trades closeThe Trend group is deleted.
6...,buy,risk=0.01,tp=100,comment=TrendNo group exists any more, so this creates one. No py, so Trend is now not pyramid managed.

Rows 3 and 6 are the whole point. The same signal produced different behaviour depending on whether a group with that comment was already open.

Common mistakes

SymptomCauseFix
Trades that should pyramid together do notComments do not match exactly (case, spaces, a trailing character)Compare the comments character by character. Use the Syntax Generator so the value is identical in every alert.
Pyramid keeps running after py was removedThe group was already stamped as pyramid managedClose every position in that group, or switch the strategy to a new comment.
Adding py does not enable pyramid on a running strategyThe same reason, in the other directionClose the group first, or use a new comment.
Two unrelated symbols share one targetThe same comment was used on both, on an EA build older than 0.64Update the EA, or make the comment unique per symbol.
A close signal wiped out another strategyThe close signal had no comment=Add the comment to every exit signal.
Direction Lock or DCA Filter rejects a trade unexpectedlyBoth filters act on pyramid-managed strategies, and the group is pyramid managedCheck the Pyramid Management mode, and whether py was on the signal that opened the group. Turn the filter off in the EA inputs if you want the strategy to pyramid without it.
Hedge protection never triggers for one strategyThe comment contains Recovery or _HedgeRename the strategy comment.
Groups split in two after the EA had to rebuild from open positionsMT5 was moved to a different computer or a fresh Windows user, so the EA's own record of comments was not available, and the comment was longer than 31 characters and came back cut shortKeep comments within 31 characters. See Restarts and comments.

Hedging and netting accounts

How several strategies share a symbol depends on the account type. GET /api/v1/live/account returns trading.margin_mode (hedging or netting) for an account with a Cloud Terminal.

  • Hedging account. Each entry opens its own position, so several strategies can hold the same symbol side by side, each with its own stop loss, take profit and comment.
  • Netting account. MT5 keeps one position per symbol, with one stop loss and one take profit. A same-side entry adds to it. An opposite entry reduces it, closes it or flips it. The position carries the comment of the latest signal, so two strategies cannot be managed separately on the same symbol. Recovery and hedge protection are off on netting accounts.

Use a hedging account for more than one strategy per symbol

When more than one strategy trades the same symbol, use a hedging account.

A good default

Name comments Strategy_Symbol, for example Breakout_EU, Breakout_GU, Scalp_XAU. Short, self-describing, no reserved strings, and readable in both your trading platform and the Analytics dashboard.

On this page