PineHookPineHook

Trade Management Commands

The five trade management commands (breakeven, modify, trail, notrail, nobreakeven) covering behavior, signal formatting, error messages, and tier differences.

Overview#

Trade management commands act on positions that are already open. They adjust stop-loss and take-profit levels, register automated stop-trailing monitors, and move stops to breakeven, all without opening or closing a position. You send these as webhook signals from TradingView the same way you send entry commands. The processing pipeline is identical: the signal is validated, delivered to the connected EA over WebSocket, and the EA executes the instruction against matching open positions on the broker.


How It Works#

breakeven#

When the platform receives a breakeven signal, it validates the parameters and delivers the signal to the EA. The EA then immediately moves the stop-loss of every matching open position to the position's entry price. If an offset is provided, the stop-loss lands at entry plus the offset rather than at entry exactly.

On a buy position, moving the stop to breakeven eliminates downside risk; the worst outcome is a scratch exit. On a sell position, the same logic applies in the opposite direction.

Step by step:

  1. You send a breakeven signal for a symbol.
  2. The platform validates all parameters and confirms the license is active.
  3. The signal is delivered to the connected EA.
  4. The EA identifies all open positions matching the symbol (and magic number, if specified).
  5. If a direction filter is present and the account is HEDGING, the EA narrows the match to only BUY or SELL positions as specified.
  6. For each matching position, the EA calculates the new stop-loss level: entry price adjusted by any offset.
  7. The EA submits a stop-loss modification to the broker for each position.
  8. If any matching position had multi-SL targets registered, those targets are cleared and replaced by the single broker-managed stop at the new level.
  9. The outcome is logged and reported back to the platform.

Auto-triggered breakeven#

Auto-triggered breakeven is a separate mechanism from the standalone breakeven command. Instead of moving the stop immediately, you configure a profit threshold on the original entry signal (buy or sell). When price reaches that threshold, the EA fires the breakeven move automatically. No second signal required.

This is useful for "set and forget" strategies where you want the stop to move to breakeven once a position is safely in profit, without having to monitor the chart and send a manual signal.

How to configure it:

The trigger parameters go on the buy or sell signal, not on a separate breakeven signal. The position opens normally, and the EA registers an auto-breakeven monitor in the background.

Trigger parameterDescription
be_trigger_pipsMinimum profit in pips before the EA fires the breakeven move. Must be greater than 0; a value of 0 registers no monitor.
be_trigger_pctMinimum profit as a percentage of the entry price before the EA fires.
be_trigger_priceAn absolute price level. When bid (for buys) or ask (for sells) reaches this level, the EA fires.

Only one trigger parameter is allowed per signal. Specifying more than one is rejected with "Conflicting breakeven trigger parameters."

Optional offset, placing the stop above or below entry:

By default, the stop is placed exactly at the entry price. An offset shifts it slightly.

Offset parameterDescription
be_offset_pipsPips above entry for a BUY (below entry for a SELL). Negative values place the stop slightly on the loss side of entry.
be_offset_pctPercentage of the entry price, added in the profitable direction.
be_offset_priceAbsolute price offset, added in the profitable direction.

Only one offset parameter is allowed per signal. Specifying more than one is rejected with "Conflicting breakeven offset parameters."

CSV signal format examples:

What it doesCSV signal
Open BUY, move SL to entry when 30 pips in profitLICENSE,buy,EURUSD,size_lots=0.1,sl_pips=50,tp_pips=100,be_trigger_pips=30
Same, but stop lands 5 pips above entry (buffer)LICENSE,buy,EURUSD,size_lots=0.1,sl_pips=50,tp_pips=100,be_trigger_pips=30,be_offset_pips=5
Open SELL, trigger on 1% profit, no offsetLICENSE,sell,GBPUSD,size_pct=1,sl_pips=40,be_trigger_pct=1
Open BUY, trigger when price reaches 1.1050LICENSE,buy,EURUSD,size_lots=0.5,sl_pips=30,be_trigger_price=1.1050
Small 1-pip trigger with 3-pip bufferLICENSE,buy,EURUSD,size_lots=0.1,sl_pips=50,be_trigger_pips=1,be_offset_pips=3
Magic-filtered, only positions with magic 1001LICENSE,buy,EURUSD,size_lots=0.1,sl_pips=50,be_trigger_pips=25,magic=1001

JSON signal format examples:

What it doesJSON signal
Open BUY, move SL to entry when 30 pips in profit{"license":"KEY","action":"buy","symbol":"EURUSD","size_lots":0.1,"sl_pips":50,"tp_pips":100,"be_trigger_pips":30}
Same, with 5-pip buffer above entry{"license":"KEY","action":"buy","symbol":"EURUSD","size_lots":0.1,"sl_pips":50,"tp_pips":100,"be_trigger_pips":30,"be_offset_pips":5}
Open SELL, trigger on 0.5% profit{"license":"KEY","action":"sell","symbol":"GBPJPY","size_pct":1,"sl_pips":60,"be_trigger_pct":0.5}
Trigger at a specific price level{"license":"KEY","action":"buy","symbol":"XAUUSD","size_lots":0.1,"sl_pips":150,"be_trigger_price":2350.00}

Lifecycle, from signal to monitor removal:

  1. You send a buy or sell signal that includes a trigger parameter.
  2. The platform validates the signal (trigger conflict check, offset conflict check, parameter range checks).
  3. The position opens as normal.
  4. Immediately after opening, the EA registers an auto-breakeven monitor for that position, recording the trigger threshold and offset.
  5. On each subsequent price tick, the EA checks whether the position's floating profit has reached the trigger.
  6. When the trigger is met, the EA calculates the breakeven price (entry price adjusted by any offset) and submits a stop-loss modification to the broker.
  7. The monitor is removed after firing. It is a one-shot event.
  8. If the EA restarts before the trigger fires, the monitor is reloaded from a local file and continues monitoring without any intervention.

Important behavioral notes:

  • Manually changing the stop-loss in MetaTrader after a position is open does NOT cancel the auto-breakeven monitor. When the trigger fires, the EA overwrites the manual edit with the calculated breakeven level. To cancel the monitor, send a nobreakeven signal.
  • If trail and auto-breakeven are both active on the same position and both resolve to the same trigger price (within one pip), neither is registered and the signal acknowledgement includes a warning.
  • The monitor runs entirely on your MT5 terminal. The server does not store per-position monitor state.
  • When the EA fires the auto-breakeven move, any multi-SL targets on the position are cleared and replaced by the single broker-managed stop at the breakeven level.
  • On HEDGING accounts, the trigger and offset are calculated per-position. On NETTING accounts, one net position exists per symbol; direction filters in the same signal are ignored (the EA logs an info message in the Experts tab).
  • Auto-triggered breakeven is available on all paid tiers. Trial accounts are subject to the standard rate limits but are not blocked from using trigger parameters.

modify#

The modify command changes the stop-loss and/or take-profit on existing open positions or pending orders, without affecting position size or direction.

Step by step:

  1. You send a modify signal with at least one SL or TP parameter.
  2. The platform validates the parameter set (checks for conflicting modes, invalid values, forbidden combinations).
  3. The signal is delivered to the EA.
  4. The EA identifies matching positions (or pending orders, if order_type is specified).
  5. Direction and target filters narrow the match further.
  6. For each match, the EA recalculates the new stop-loss and/or take-profit and submits a modification to the broker.
  7. If modifying individual levels in a multi-TP/SL schedule, only the specified levels are updated; other levels are untouched.

SL/TP specification modes (priority: price beats pct beats pips):

ModeParametersNotes
Absolute pricesl_price, tp_priceExact broker price level
Pip distance from entrysl_pips, tp_pipsCalculated relative to the position's entry
Percentage from entrysl_pct, tp_pctPercentage of the entry price

Only one mode per level is permitted. If two modes are present for the same level (for example, both sl_pips and sl_price), the signal is rejected.

Scope filters:

ParameterValuesEffect
targetsl, tp, both (default)Limits the modify to stop-loss only, take-profit only, or both
directionlong, shortHEDGING accounts only: restricts to BUY or SELL positions. Ignored on NETTING accounts.
order_typebuystop, buylimit, sellstop, selllimitTargets pending orders instead of open positions. Cannot be combined with direction.
magicintegerRestricts to positions opened with that magic number

Post-open multi-level editing:

After a position is opened with a multi-TP/SL schedule, the modify command can move individual target price levels. The close amounts (the percentage or lot size to close at each target) are fixed at position open time and cannot be changed.

Available numbered parameters:

Parameter rangeModeExample
tp1_pips - tp10_pipsTP level N at pip distance from entrytp2_pips=80
tp1_price - tp10_priceTP level N at an exact pricetp2_price=1.1050
tp1_pct - tp10_pctTP level N at a percentage from entrytp1_pct=1.0
sl1_pips - sl10_pipsSL level N at pip distance from entrysl1_pips=30
sl1_price - sl10_priceSL level N at an exact pricesl1_price=1.0920
sl1_pct - sl10_pctSL level N at a percentage from entrysl1_pct=0.5

The N in the parameter name corresponds to the target number as it was configured at position open (tp1 is the first TP, tp2 the second, and so on). Only the parameters you include are updated; all other targets are left as they are.

Base and per-target edits apply together. A single modify can carry both a base stop/target change (sl_pips/sl_price/sl_pct, tp_pips/tp_price/tp_pct — the position's broker-managed SL/TP) and per-target leg edits (tp1_pips, sl1_price, and so on), and the EA applies all of them in the one command. For example, modify EURUSD,sl_price=1.0800,tp1_pips=80 moves the base stop to 1.0800 and re-prices the TP1 leg in the same modify. The ACK reports success only if every part applied: if the base SL/TP move fails (for example, a stop on the wrong side of the current price) the modify reports failure with the base error, even when the leg edits themselves were valid — a failing base move is never hidden behind a successful leg edit.

Numbering constraint: the sequential no-gaps rule applies when you first configure the ladder on the entry (buy/sell) signal. A modify may address any subset of already-configured levels (for example only tp2, or tp1 and tp3), and only the levels you name are changed.

CSV signal format examples:

What it doesCSV signal
Move TP2 to 80 pips from entryLICENSE,modify,EURUSD,tp2_pips=80
Move TP1 to 1% from entryLICENSE,modify,EURUSD,tp1_pct=1.0
Move two SL levels at once (pip and price)LICENSE,modify,EURUSD,sl1_pips=30,sl2_price=1.0850
Move a gold TP2 to an exact priceLICENSE,modify,XAUUSD,tp2_price=2050.00
Move TP1 and SL1 togetherLICENSE,modify,EURUSD,tp1_pct=1.0,sl1_pct=0.5

JSON signal format examples:

What it doesJSON signal
Move TP2 to 80 pips, SL1 to 0.5% from entry{"license":"KEY","action":"modify","symbol":"EURUSD","tp2_pips":80,"sl1_pct":0.5}
Move TP2 on gold to an exact price{"license":"KEY","action":"modify","symbol":"XAUUSD","tp2_price":2050.00}
Move SL1 on gold{"license":"KEY","action":"modify","symbol":"XAUUSD","sl1_price":2010.00}

The standard scope filters (magic, direction) apply here the same as they do for single SL/TP editing.

trail#

The trail command registers a trailing stop monitor on all matching open positions. If a position already has a trailing stop registered, the new signal replaces it with the updated parameters.

The trailing stop runs locally on your MT5 terminal. On each price tick, the EA checks whether conditions are met to advance the stop-loss. The stop only ever moves in the profitable direction; it never steps back.

Step by step:

  1. You send a trail signal with a distance mode and optional trigger and step.
  2. The platform validates the parameter set (exactly one distance mode required, no conflicting triggers or steps).
  3. The signal is delivered to the EA.
  4. The EA identifies all matching open positions.
  5. For each position, the EA registers a per-position monitor, pre-computing the activation threshold from the trigger parameters.
  6. On each subsequent price tick, the EA evaluates the trigger condition, then calculates the proposed new stop level.
  7. The stop advances only when the proposed level is more favorable than the current stop and the move meets the step threshold.
  8. Each stop advancement is logged and reported to the platform as a trail event.

Distance modes (exactly one required):

ModeParametersNotes
Pipsdistance_pips, optional trail_stepStop trails at a fixed pip distance. Step controls minimum movement per update.
Percentagedistance_pct, optional trail_pct_stepDistance is a percentage of the entry price, making it instrument-agnostic.
ATRdistance_atr, optional trail_atr_period (default 14), optional trail_atr_timeframe (default: the EA chart's current timeframe)Distance scales with current market volatility. Step is auto-set to 10% of the ATR-based trail distance (i.e. 10% of ATR x distance_atr) and is not user-configurable.

Valid ATR timeframes: M1, M5, M15, M30, H1, H4, D1, W1, MN1.

Specifying more than one distance mode in a single signal is rejected.

Trigger modes (optional, at most one):

Without a trigger, trailing activates as soon as the position's profit reaches the trail distance. A trigger delays activation until a specific condition is met:

TriggerActivates when
trail_triggerPosition profit reaches the specified pip count
trail_trigger_pctPosition profit reaches the specified percentage of entry price
trail_trigger_pricePrice crosses the specified level (bid crosses for buy; ask crosses for sell)

Priority if multiple triggers were somehow present (they are rejected at validation): price beats pct beats pips.

Step parameters:

The step prevents excessive broker modifications by requiring the stop to advance by at least the step amount before a new order is submitted. Without a step, the EA sends a modification on every favorable tick.

  • trail_step applies to pips mode (in pips).
  • trail_pct_step applies to percentage mode (as a percentage of entry price).
  • ATR mode has no configurable step; it is always 10% of the ATR-based trail distance (i.e. 10% of ATR x distance_atr).

notrail#

Removes the trailing stop monitor from all matching open positions. The stop-loss stays at whatever level it reached when the monitor was removed; only the automated trailing behavior ends.

Use this when market conditions change and continued trailing is no longer desired, but the current stop level should be preserved.

nobreakeven#

Removes the auto-breakeven monitor from all matching open positions. The stop-loss stays at its current level; only the pending automated trigger is cancelled.

This command has no effect on an immediate breakeven that already fired. It cancels monitors that are still waiting for their trigger threshold to be crossed.


Signal Format#

Both CSV and JSON formats are accepted for all trade management commands.

Required fields#

FieldCSV positionJSON keyDescription
License keyFirst fieldlicenseYour PineHook license key
CommandSecond fieldactionOne of: breakeven, modify, trail, notrail, nobreakeven
SymbolThird fieldsymbolBroker symbol name, 1-20 alphanumeric characters. Lowercase is accepted and automatically uppercased on receipt.

CSV format#

Fields are comma-separated. The first three are positional (license, command, symbol in that order). Additional parameters follow as key=value pairs in any order.

SignalCSV example
Immediate breakevenABCD-1234-5678-9DEF,breakeven,EURUSD
Breakeven with 5-pip profit lockABCD-1234-5678-9DEF,breakeven,EURUSD,be_offset_pips=5
Modify SL by pip distanceABCD-1234-5678-9DEF,modify,EURUSD,sl_pips=50
Modify TP to exact priceABCD-1234-5678-9DEF,modify,EURUSD,tp_price=1.0950
Modify only longsABCD-1234-5678-9DEF,modify,EURUSD,sl_pips=40,direction=long
Modify pending buy stopsABCD-1234-5678-9DEF,modify,EURUSD,sl_price=1.0750,order_type=buystop
Trail at 20 pipsABCD-1234-5678-9DEF,trail,EURUSD,distance_pips=20
Trail with stepABCD-1234-5678-9DEF,trail,EURUSD,distance_pips=20,trail_step=5
Trail at 0.5% of entryABCD-1234-5678-9DEF,trail,EURUSD,distance_pct=0.5
ATR-based trailABCD-1234-5678-9DEF,trail,EURUSD,distance_atr=2.0,trail_atr_period=14,trail_atr_timeframe=H1
Trail with activation triggerABCD-1234-5678-9DEF,trail,EURUSD,distance_pips=20,trail_trigger=30
Remove trailing stopABCD-1234-5678-9DEF,notrail,EURUSD
Remove breakeven monitorABCD-1234-5678-9DEF,nobreakeven,EURUSD
Filter by magic numberABCD-1234-5678-9DEF,notrail,EURUSD,magic=12345

JSON format#

SignalJSON example
Immediate breakeven{"license":"ABCD-1234-5678-9DEF","action":"breakeven","symbol":"EURUSD"}
Breakeven with offset{"license":"ABCD-1234-5678-9DEF","action":"breakeven","symbol":"EURUSD","be_offset_pips":5}
Modify SL and TP{"license":"ABCD-1234-5678-9DEF","action":"modify","symbol":"EURUSD","sl_price":1.0750,"tp_price":1.0950}
Modify short positions only{"license":"ABCD-1234-5678-9DEF","action":"modify","symbol":"EURUSD","sl_pips":40,"direction":"short"}
Modify pending sell limits{"license":"ABCD-1234-5678-9DEF","action":"modify","symbol":"GBPUSD","tp_price":1.2700,"order_type":"selllimit"}
Move TP2 target level{"license":"ABCD-1234-5678-9DEF","action":"modify","symbol":"EURUSD","tp2_pips":80}
Trail pips{"license":"ABCD-1234-5678-9DEF","action":"trail","symbol":"EURUSD","distance_pips":20,"trail_step":5}
Trail percent{"license":"ABCD-1234-5678-9DEF","action":"trail","symbol":"XAUUSD","distance_pct":0.5,"trail_pct_step":0.1}
Trail ATR{"license":"ABCD-1234-5678-9DEF","action":"trail","symbol":"EURUSD","distance_atr":2.0,"trail_atr_period":14,"trail_atr_timeframe":"H1"}
Remove trail{"license":"ABCD-1234-5678-9DEF","action":"notrail","symbol":"EURUSD"}
Remove breakeven monitor{"license":"ABCD-1234-5678-9DEF","action":"nobreakeven","symbol":"EURUSD"}

Data Flow Summary#

Your TradingView alert fires and sends the signal payload to the platform webhook. The platform reads the raw payload, detects whether it is CSV or JSON, and parses out all fields. Every parameter is validated for type, value range, and mutual exclusivity before the signal advances. If validation fails, the signal is rejected immediately and a record is written to your Rejected Signals log. No further processing occurs.

If validation passes, the platform verifies the license key, checks subscription status, and confirms signal authentication if you have that feature enabled. A valid, authenticated signal is then placed in the delivery queue for the license.

The EA, which maintains a persistent WebSocket connection to the platform, receives the queued signal. It identifies the matching open positions (or pending orders, for modify with order_type), applies any scope filters, and submits the required stop-loss and/or take-profit modifications to the broker. For trail and breakeven, the EA additionally registers per-position monitors that evaluate on every subsequent price tick until they fire or are removed.

The EA reports each outcome back to the platform (success, broker rejection, or a warning), and these events are recorded in Signal Logs and the trade history for the license.


User-Facing States#

StateWhat It MeansImpact
Trail registeredThe EA accepted the monitor and begins evaluating it on each tick.The stop-loss will start moving once the trigger condition is met and price advances by at least the configured step.
Trail activeThe trigger threshold was crossed and the stop is now following price.The stop advances each time price moves far enough beyond the step floor in the profitable direction.
Trail deregisteredThe monitor was removed: either breakeven fired, a notrail signal was received, or the position closed.The stop-loss stays at whatever level it last reached; no further automatic movement.
Breakeven monitor registeredThe EA is waiting for price to cross the trigger threshold.The stop-loss will not move until the trigger fires.
Breakeven triggeredPrice crossed the trigger. The stop was moved to entry plus any configured offset, and the monitor removed itself.The stop is now at the breakeven level. Auto-breakeven will not fire again on this position.
Breakeven monitor deregisteredThe monitor was removed before firing: a trail fired first, a nobreakeven signal was received, or the position closed.The stop-loss remains at whatever level it held when the monitor was removed.
Modify appliedThe EA successfully submitted a stop-loss and/or take-profit change to the broker.Positions reflect the updated levels. Visible in the broker platform and Signal Logs ACK details.
Modify broker-rejectedThe EA sent the modification but the broker refused it, typically because the new stop level violates the broker's minimum stop distance.The levels are unchanged. A warning appears in the MetaTrader Experts tab and is forwarded to Signal Logs.

Error Messages and Meanings#

Messages fall into two groups based on where you encounter them.

Group A, validation errors, are returned before the signal reaches the EA. They appear as the HTTP response body sent to TradingView (visible in the alert's execution status pill) and are stored as a row in your dashboard at Signal Logs → Rejected Signals tab. That row shows the timestamp, license, command, symbol, an offending-parameter pill, and the verbatim reject reason. Two conditions must be met for a Rejected Signals row to appear: the platform must be able to extract a valid license key from the payload, and very long messages may be shortened.

Group B, EA runtime messages, are emitted by the EA during tick processing. They appear in the MetaTrader Experts tab and the EA's local support log file.

Group A: Validation errors#

MessageCauseWhat to do
"Conflicting trailing stop parameters"More than one distance mode is present in the signal, for example both distance_pips and distance_pct.Remove all but one distance mode. Use distance_pips, distance_pct, or distance_atr, never a combination.
"Conflicting step parameters"Both trail_step and trail_pct_step appear in the same signal.Remove the one that does not match the chosen distance mode: trail_step pairs with pips mode; trail_pct_step pairs with percentage mode.
"Conflicting trail trigger parameters"More than one trail trigger is present.Keep only one: trail_trigger, trail_trigger_pct, or trail_trigger_price.
"Conflicting breakeven trigger parameters"More than one breakeven trigger is present.Keep only one: be_trigger_pips, be_trigger_pct, or be_trigger_price.
"Conflicting breakeven offset parameters"More than one offset mode is present.Keep only one: be_offset_pips, be_offset_pct, or be_offset_price.
"trail command requires a distance parameter"A trail signal was sent without any distance mode.Add exactly one distance mode: distance_pips, distance_pct, or distance_atr.
"trail_step=X is invalid. Must be greater than 0 (minimum SL move in pips)."trail_step is zero or a negative number.Set trail_step to a positive pip value, or omit it entirely to trail continuously without a step floor.
"Conflicting stop loss parameters: sl_pips, sl_price. Use only one of: sl_pips, sl_price, or sl_pct." (take profit conflicts use the equivalent "Conflicting take profit parameters" wording)Two modes were provided for the same level, for example both sl_pips and sl_price.Use only one mode per level: price, pct, or pips.
"Unrecognized parameter - did you mean 'Y'?" (or "Unrecognized parameter (typo or doesn't exist)" when there is no close match)A parameter name was misspelled, for example distance_pip instead of distance_pips.Correct the parameter name in the TradingView alert template.
"Cannot combine 'order_type' with 'direction' on modify command. Pending orders already have an implicit direction."A modify signal includes both direction and order_type.Remove one. Use direction to scope open positions by side; use order_type to target pending orders instead of positions. They serve different purposes and cannot appear together.
"Invalid numeric value for 'X': Y"A numeric parameter received a non-numeric value, NaN, or Infinity.Correct the value in the alert template. Common cause: TradingView variable not resolving correctly before the alert fires.
"Authentication failed"The license key is invalid, inactive, or expired.Verify your license key and subscription status in Dashboard → Licenses.
"Authentication required"Signal auth is enabled for this license but no auth= password was included in the signal.Add auth=YourPassword to the alert template. The password is configured in Dashboard → License Settings → Signal Auth.
"Invalid authentication"An auth= password was included but did not match the configured password.Verify the password in Dashboard → License Settings → Signal Auth and update the alert template accordingly.

Out-of-range parameter values are rejected (HTTP 400):

The following out-of-range values are rejected. The signal is not delivered to the EA. The rejection is written to your Signal Logs → Rejected Signals tab and also appears in the main Signal Logs timeline as a row with status=blocked and reason param_invalid.

ParameterAccepted rangeReject message
distance_atr0.1 to 20.0"Invalid value 'X' for distance_atr - must be between 0.1 and 20.0 (ATR multiplier)"
trail_atr_period2 to 500"Invalid value 'X' for trail_atr_period - must be between 2 and 500"
distance_pctgreater than 0 and at most 99"Invalid value 'X' for distance_pct - must be greater than 0 and at most 99"
trail_pct_step0 or greater (values above distance_pct are capped at distance_pct)"Invalid value 'X' for trail_pct_step - must be >= 0"
trail_atr_timeframeone of M1, M5, M15, M30, H1, H4, D1, W1, MN1"Invalid value 'X' for trail_atr_timeframe; must be one of: ..."

Group B: EA runtime messages#

MessageCauseWhat to do
"[Trail] STOPS_LEVEL violation, skipping SL update, will retry"The proposed new stop is closer to current market price than the broker's minimum stop distance. The EA skipped this tick and will retry on the next.No action needed. The stop will advance as soon as price creates sufficient separation. If the message persists for several minutes, the configured trail distance may be smaller than the broker's current minimum stop distance for that instrument.
"[Breakeven] STOPS_LEVEL violation, skipping BE move, will retry"The calculated breakeven stop level is inside the broker's minimum stop distance. The EA will retry.No action needed. This is common during high-volatility windows when broker minimum distances widen temporarily. The modification will execute once price clears the zone.
"[Trail] ATR handle not ready, skipping this tick"The ATR indicator has not yet produced its first value. Expected on the first tick or two after the trail is registered.No action needed. The EA resumes ATR trailing automatically once the indicator initializes.
"[Trail/BE] Position not found on reload, monitor discarded"After an EA restart, a saved monitor referenced a position that no longer exists at the broker.If the position is still open at the broker but the EA does not see it, check the EA connection and reconnect. If the position is already closed, no action is needed.
"INFO: 'direction=long' is a HEDGING-only feature and is ignored on NETTING accounts. Modify will apply to the net position for SYMBOL."A modify signal with direction= was received on a NETTING account.This is expected behavior. On NETTING accounts, only one position per symbol exists, so direction filtering has no meaning. The modify applies to the single net position. Omit direction= in alerts targeting NETTING accounts.

Where to look#

If you see a message from...Where to look
Group A (validation)Signal Logs → Rejected Signals tab in the dashboard. Timestamp, command, symbol, offending parameter pill, verbatim reject reason. The same text appears in TradingView's alert execution status.
Authentication blockSignal Logs → main timeline in the dashboard. Signal row with status=blocked and reason shown (missing_auth or invalid_auth).
Group B (EA runtime)MetaTrader Experts tab and the EA support log file in your MQL5/Files folder. Timestamped EA log lines for each monitor event.
Modify applied but levels unchangedSignal Logs → main timeline (expand the ACK row for details), then check the broker platform. The ACK details show whether the broker accepted or refused the modification and include the proposed levels.

Plan and Tier Differences#

FeatureTrialStandardProPremium
breakeven (immediate)AvailableAvailableAvailableAvailable
Auto-breakeven trigger (be_trigger_pips, be_trigger_pct, be_trigger_price on entry signals)AvailableAvailableAvailableAvailable
nobreakevenAvailableAvailableAvailableAvailable
trail (pips, percent, and ATR modes)AvailableAvailableAvailableAvailable
notrailAvailableAvailableAvailableAvailable
modify (SL/TP, direction, target, order_type)AvailableAvailableAvailableAvailable
Multi-level TP/SL price editing via modifyAvailableAvailableAvailableAvailable

When a subscription lapses: the platform stops accepting new signals. Trail and breakeven monitors already registered on the EA continue running locally on your MT5 terminal; they do not require a server connection to operate. No new signals of any type can be delivered until the subscription is restored.

Trial accounts: all five trade management commands are available on trial. Trial accounts are subject to the standard rate limits (signals per minute and signals per day) but are not blocked from any specific command.

Functional differences between paid tiers: none. Standard, Pro, and Premium users have identical access to all five commands. What differs by tier is the signal rate limit (signals per minute and per day). Trade management commands (breakeven, modify, trail, notrail, nobreakeven) count toward those rate limits. Unlike close and cancel commands, which are never dropped by the rate limit (a kill-switch must always reach the EA), a trade management command sent while you are over the per-minute or per-day cap is rejected with HTTP 429.


Known Edge Cases and Gotchas#

  • On HEDGING accounts, a breakeven signal without a direction filter moves the stop on every matching position (both BUY and SELL) to each ticket's own entry price. This is intentional. Each ticket is processed independently using its own entry, so a single signal can flatten risk across both sides of a same-magic hedge in one shot. breakeven has no per-side filter; to move the stop on only one side, send a modify scoped with direction=long or direction=short instead. In multi-strategy magic mode, the magic=N parameter is already required on every management command, so the action is automatically scoped to one strategy.

  • modify with direction=long or direction=short is silently ignored on NETTING accounts. The EA logs an informational message in the Experts tab and applies the modify to the single net position as if direction had been omitted. If you're migrating a hedging strategy to a NETTING broker, replace direction filters with magic number filters.

  • modify with order_type and direction in the same signal is rejected at parse time. Pending orders have an implicit direction (a buy stop is inherently a long order), so combining them is ambiguous. Use one or the other.

  • Manually editing the stop-loss in MetaTrader after a breakeven monitor is registered does NOT cancel the monitor. When the trigger fires, the EA overrides the manual edit. To cancel the pending auto-breakeven, send a nobreakeven signal.

  • The same applies to trailing stop monitors. A manual stop-loss edit in the broker platform does not deactivate the trail. The EA continues to manage the stop from the manually-set level.

  • If both a trail trigger and a breakeven trigger resolve to the same trigger price (within one pip of each other at registration time), neither monitor is registered. The signal acknowledgement includes a warning. The trade still executes normally; other features like multi-TP targets and timed close are not affected.

  • notrail does not remove the stop-loss. It only removes the automated trailing behavior. The stop stays at whatever level it last advanced to.

  • nobreakeven does not remove the stop-loss and does not undo an already-fired breakeven. It only cancels a monitor that is still waiting for its trigger threshold.

  • A negative be_offset_pips on a breakeven signal is valid and intentional. be_offset_pips=-5 on a buy sets the stop five pips below entry rather than at entry, giving a small buffer before the stop fires after the breakeven move. Some traders prefer this to avoid a stop-out on a minor pullback immediately after the trigger executes.

  • be_trigger_pips and be_trigger_pct must be greater than 0 to register an auto-breakeven monitor. A value of 0 is treated the same as omitting the parameter: no monitor is registered and breakeven never fires. If you want immediate breakeven, send a standalone breakeven command after entry, or use a small positive trigger.

  • In ATR-mode trailing, the trail distance changes on every tick as the ATR indicator updates. Widening volatility extends the follow distance; narrowing volatility tightens it. The stop-loss itself never moves backward regardless of how the ATR value fluctuates.

  • ATR step size is not user-configurable in ATR mode. It is always 10% of the ATR-based trail distance (i.e. 10% of ATR x distance_atr) and cannot be overridden. Only pips mode (trail_step) and percentage mode (trail_pct_step) have a configurable step.

  • After a breakeven signal fires and clears multi-SL targets, those targets cannot be restored without closing and reopening the position.

  • Each modify signal is absolute, not additive. Sending sl_pips=50 twice does not move the stop 100 pips from entry; it sets it to 50 pips from entry each time.

  • On NETTING accounts, a second buy or sell signal for the same symbol does not create a new ticket; the broker adds to the existing net position. If that second signal includes multi-TP/SL targets, the EA replaces the previous target schedule with the new one. To modify only the new lots' targets without affecting the previous schedule, the position must be closed and reopened.

  • An unrecognized value for trail_atr_timeframe is rejected with HTTP 400 before the signal reaches the EA, and the rejection is recorded in Signal Logs → Rejected Signals. Use one of the valid MT5 timeframes: M1, M5, M15, M30, H1, H4, D1, W1, MN1. When the parameter is omitted entirely (rather than set to an invalid value), the EA uses the current timeframe of the chart it is attached to.


Frequently Asked Questions#

Q: Can I use both trailing stop and auto-breakeven on the same position at the same time? A: Yes. Both monitors are registered independently and coexist until one fires. When either one fires, it removes the other to prevent conflicting modifications.

Q: Can I move the stop to breakeven on only one side of a hedge? A: Not with breakeven itself. breakeven has no direction filter; it moves the stop on every matching position (both BUY and SELL on a hedging account) to each ticket's own entry price, which is useful for flattening risk on both sides of a same-magic hedge in a single signal. To move the stop on only one side, send a modify scoped with direction=long or direction=short and set the stop explicitly (for example, sl_price= that side's entry price). The direction filter works on HEDGING accounts only; on NETTING accounts it is ignored.

Q: What is the difference between notrail and manually changing the stop-loss in MetaTrader? A: A manual edit in MetaTrader stops the stop at a specific level, but the trail monitor continues running and will override that manual edit on the next tick if the trailing logic would move the stop further. Sending notrail removes the monitor entirely, so no further automated movement occurs. To freeze the stop at its current level, notrail is the correct approach.

Q: I sent a modify signal but nothing changed. How do I debug this? A: Start at Signal Logs → Rejected Signals tab to check whether the signal was rejected. If not there, find it in the main Signal Logs timeline and expand the ACK details, which show whether the broker accepted or refused the modification and at what levels. If the broker refused, the new stop level likely violated the broker's minimum stop distance and needs to be moved further from current price.

Q: My trailing stop disappeared after I sent a breakeven signal. Is that a bug? A: No. When breakeven fires, it removes any active trailing stop monitor for that position. This is intentional: both features manage the same stop-loss, and having both active after breakeven triggers would produce conflicting modifications. If trailing is still needed after breakeven, send a new trail signal.

Q: Can I modify the price levels of my multi-TP targets after a position is already open? A: Yes. Send a modify signal with numbered target parameters such as tp1_pips, tp2_price, or sl1_pct. Only the price levels can be changed after open; the close percentages or lot amounts for each target are fixed at position entry time.

Q: Why is my direction=long being ignored on the modify signal? A: If the account is a NETTING account, direction filtering has no meaning; only one position per symbol exists. The EA logs an informational message in the Experts tab and applies the modify to the net position. On HEDGING accounts, confirm that the signal is not also including order_type, since that combination is rejected at parse time.

Q: I sent nobreakeven but the stop moved to breakeven afterward. What happened? A: The most likely cause is that the breakeven monitor fired in the brief window between when the entry signal was delivered and when the nobreakeven signal arrived. If the trigger threshold was already reached before nobreakeven was processed, the fire is irreversible. Check Signal Logs for the timestamps of both signals to confirm the sequence. To cancel the monitor reliably, send nobreakeven immediately after the entry signal.

Q: What happens if the trailing stop or breakeven monitor is active when my EA restarts? A: Both monitor types are saved to local files on the MT5 machine and reloaded automatically when the EA restarts. If the position is still open at the broker, monitoring resumes from where it left off. If the position was closed while the EA was offline, the monitor is discarded on reload. No manual intervention is needed.

Q: My signal was rejected with "trail command requires a distance parameter." What does that mean? A: The trail command must include exactly one distance mode: distance_pips, distance_pct, or distance_atr. A trigger parameter (trail_trigger, trail_trigger_pct, trail_trigger_price) or a step parameter alone is not sufficient. The distance tells the EA how far behind price to keep the stop-loss.

Q: What is ATR-based trailing and which timeframe should I use? A: ATR (Average True Range) measures recent price volatility. In ATR mode, the trail distance equals the current ATR indicator value multiplied by the factor you specify (distance_atr), so the stop automatically widens in volatile conditions and tightens in calm ones. The hourly timeframe (H1) is a common starting point for intraday positions; daily (D1) suits longer-term holds. If no timeframe is specified, the EA uses the current timeframe of the chart it is attached to.