Back to contents

Magic Entry · MT5 trade manager

Trailing stop in MT5: START and GAP in Magic Entry

+TR on the stop or take card sets a START level. When price reaches START, the level starts following price at the GAP distance and moves only in the direction of profit: on pullbacks it stays put. The main stop, the main take and each partial take profit have their own +TR.

+TR

Trailing

+TR on the stop or take card sets a START level. When price reaches it, the level starts following price at a set distance and never moves back.

  • START is the price at which trailing turns on.
  • GAP is the distance the level keeps from price; by default, the distance to the current level.
  • On pullbacks the level stays put: it moves only in the direction of profit.
  • The main stop, the main take and each partial take profit have their own +TR button.
  • Trailing levels have no line across the chart: a dashed frame is drawn from START to GAP.

How to turn on trailing

  1. Select the position card so its levels show on the chart.
  2. Click +TR on the stop card (or on a take profit card) and place START: the price at which trailing turns on.
  3. Set GAP, the distance the level keeps from price; by default it is the distance to the current level.
  4. On the chart, trailing is drawn as a dashed frame from START to GAP, without a line across the chart.

Example: a buy at 1.10000, START 1.10500, GAP 30 pips

Until price reaches 1.10500, the stop stays where it is. At 1.10500 trailing turns on and the stop is 30 pips behind price: 1.10200.

Price rises to 1.11000: the stop follows to 1.10700. Price pulls back to 1.10800: the stop stays at 1.10700, because it only moves toward profit. A further drop to 1.10700 closes the trade at about +70 pips.

Advisor inputs for this function

Set on the Inputs tab (F7) when you attach Magic Entry to a chart. Captions and defaults are the advisor’s own.

  • SpreadSPREAD_CONTROLDefault: ON

    MetaTrader draws candles by Bid, but a sell closes at Ask — a spread above the candles. So a sell stop can trigger even though the candle never reached the line. If on, the advisor places the sell stop the current spread above the click and recalculates volume for the same risk.

    • A buy doesn't need this: it enters at Ask, so the spread is already inside its stop.
    • The wider the spread, the smaller the volume, while the money at risk stays the same: with a 100-point stop and a 30-point spread — 0.76 lots instead of 1.00.
    • An open position's take profit can't be set closer to price than the spread: for a buy — not below Ask plus spread, for a sell — not above Bid minus spread. Breakeven and trailing also keep a spread's distance.
    • Turn it off and the stop lands exactly at the click point, but the spread can knock a sell out.

    OFFSpread OFF: stop at the click point

    ONSpread ON: stop a spread higher

Other Magic Entry functions