Stopline Trade Manager › Guides
Hidden stop loss in MT5 and MT4: how it works and its limits
A hidden (virtual) stop loss is kept by an Expert Advisor in your terminal, not on the broker's server: the broker sees a position without a stop. When the price reaches the level, the EA closes the position at market. MetaTrader has no hidden stop of its own, and a hidden stop works only while the terminal runs.
Where MetaTrader keeps a stop
A stop loss or take profit set in MetaTrader, from the order window, the Modify dialog or a dragged level, is held on the broker's server. It triggers whether your terminal is open or not. MetaTrader 5 and MetaTrader 4 have no setting that keeps a stop off the server; a hidden stop always comes from an Expert Advisor.
MetaTrader's own help draws the same line for its Trailing Stop: it runs in the terminal, not on the server, so with the terminal off only the stop loss it last set can trigger. A hidden stop has the same dependency, with one difference that matters: when the terminal is off, the broker holds no stop at all for that position.
To see what the broker holds, look at the position's row on the Trade tab of the Toolbox (MetaTrader 5) or the Terminal window (MetaTrader 4). A position with hidden stops shows no stop loss and no take profit there.
How a hidden stop works
- When you hide a position's stops, the EA removes the stop loss and the take profit from the broker's server and keeps both levels itself.
- On every tick it compares the activation price with the levels. A buy's stop loss is hit when the price falls to it or below, a sell's when the price rises to it or above; the take profits mirror this.
- When a level is hit, the EA sends a market order that closes the whole position. If the close is refused, for example because the market is closed, it tries again a few seconds later.
- The levels are saved to a file in the terminal's data folder, so they survive a restart of the terminal and, in MetaTrader 4, the new ticket a position gets after a partial close.
The limits
The terminal must keep running
A hidden stop exists only inside the EA. If the computer sleeps, the connection drops, the terminal is closed or the EA is removed from the chart, nothing closes the position at the hidden level, and the broker holds no stop for it. For trades you hold while you are away from the computer, run the terminal on a VPS, or put the stops back on the server before you leave.
Gaps
A hidden stop is a market order sent at the first price the EA receives at or past the level. After a gap, that price can be well beyond the stop. A stop held by the broker can also fill at a worse price than the one you set when the price gaps; a hidden stop adds the time the EA takes to see the price and the time the close order takes to reach the server.
Disconnects and restarts
While the terminal is disconnected, the EA receives no prices and can send no orders, so a hidden stop cannot act. When the EA runs again it reads the saved levels. If the price is already past a hidden stop at that moment, the EA closes the position at the next price it receives, which may be far from the level.
No backstop at the broker
Stopline Trade Manager does not keep a wider real stop behind a hidden one. A position with hidden stops has no stop loss and no take profit on the server. If you want a stop at the broker while you are away, choose Restore real SL/TP in the position's menu, or press Hide SL/TP again in Manage mode: the EA sends the levels back to the server as an ordinary stop loss and take profit.
Hidden stops in Stopline Trade Manager
- Hidden SL/TP on the Other tab hides the stops of the positions the EA manages and gives every new position hidden stops; the VS chip in the header lights up while it is on. Turning it off sends the stops back to the server.
- For a single position, use Hide SL/TP (virtual) and Restore real SL/TP in its menu (click the position's label on the chart). Hide SL/TP in Manage mode on the Trade tab does the same for the ticked positions.
- Hidden stops are drawn as
vSL #ticketandvTP #ticketlines. Drag a line to move that position's stop. A level the price has already reached is refused, with a message, so a slip of the mouse cannot close the trade. - Activation price sets the price that triggers hidden stops and virtual pending orders: Ask / Bid (natural), Ask, Bid, Mid or the bar close. Ask / Bid checks a buy's stops against the Bid and a sell's against the Ask, the prices the close fills at.
- Automatic breakeven and the trailing stop move the hidden stop, so a hidden stop can still lock in profit.
- Virtual pending orders on the same tab work the same way: the EA keeps the order and sends a market order when the price reaches it. The daily loss limit, the spread limit and the session check hold a virtual order until the block clears.
It works the same on MetaTrader 5 and MetaTrader 4.
Stopline Trade Manager
Hidden stops and virtual pending orders, plus partial closes, trailing stops and breakeven that run by rules you set. US$49, one-time payment (launch price for the first 10 copies, then US$99).
Stopline Trade Manager EZ has no hidden stops: every stop loss and take profit it sets is held by the broker.
More guides
- How to calculate lot size in MT5 and MT4
- Symbol specification in MT5 and MT4: the figures behind the lot
- Partial close in MT5 and MT4: six ways to set the levels
- Multiple take profits in MT5 and MT4: TP1, TP2, TP3
- Seven trailing stop types compared
- Daily loss limit in MetaTrader
- Breakeven in MT5 and MT4: four ways to move the stop to entry
- One-click trading in MT5 and MT4 compared with a trade panel
- What is a trade manager EA? A checklist for choosing one