Back to contents

Magic Entry · MT5 trade manager

Pending orders in MT5: cancel level and delayed activation in Magic Entry

+C on a pending order card sets a cancel level: if price reaches it before the entry, Magic Entry removes the order. +P sets a PENDING level: the order is pulled from the market and becomes virtual, and the advisor sends it to the broker only when price crosses that level. Both are done by the advisor, so the terminal must be running.

+C

Order cancel level

+C on a pending order card sets a cancel level. If price reaches it before the entry, the advisor removes the order on its own. This way a pullback limit order lives only until a key level — for example, the high on the left.

  • Without a cancel level, the limit order fills after the idea has already played out — and most often that ends in a stop.
  • The button exists only on orders, not on open positions.
  • There can be two cancel levels — for different scenarios.
  • The advisor does the cancel, so the terminal must be running.
Key I
+P

Delayed activation

+P sets a PENDING level. The order is pulled from the market and becomes virtual; the advisor sends it to the broker only when price crosses that level. This is how you enter after a sweep of the low: PENDING on the low, entry above it — once triggered, it is a BUY STOP, a breakout order.

  • A regular limit order fills on the first touch — and the sweep of the low itself hits its stop.
  • With PENDING there is no position yet at that moment: the order reaches the broker only after the low.
  • The advisor picks the order type itself: entry below price — limit, above price — stop, that is, a breakout entry.
  • Together with cancel levels, it covers "first there, then entry" scenarios.

How to set the levels

  1. Place a limit order with LIMIT and select its card in the Orders group.
  2. Click +C (or press I) and click the price where the order should be cancelled. A second cancel level can be added for another scenario.
  3. For delayed activation, click +P and place the PENDING level: the order becomes virtual and is labeled PENDING.
  4. When price crosses PENDING, the advisor sends the order and picks its type itself: for a buy, an entry below price becomes a BUY LIMIT and one above price a BUY STOP; for a sell, an entry above price becomes a SELL LIMIT and one below price a SELL STOP.

Example: entry after a sweep of the low

A regular buy limit near a low fills on the first touch, and the sweep of the low itself hits its stop. With PENDING on the low and the entry above it, there is no position during the sweep: the order reaches the broker only after the low, as a BUY STOP, a breakout entry.

A cancel level does the opposite job: a pullback limit order lives only until a key level, for example the high on the left. If price gets there first, the idea has played out and the order is removed instead of filling late.

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.

  • Set CANCEL level (pending orders only)HOTKEY_CANCEL_LEVELDefault: I

    Pending order cancel level: a click sets the price at which the order is removed.

  • Calculate Limit activation marginCALC_LIMIT_MARGINDefault: ON

    Limit and stop orders only. If on, the advisor checks in advance whether there will be enough free margin when the order fills; if not, it reduces the volume and shows MARGIN MAX. Turn it off and the check follows the broker's rules for pending orders, so an oversized order may be rejected when it triggers.

  • Pending and cancel linesLABELS_LINE_ORDERDefault: ON

    The same for the pending order's trigger level and its cancel levels.

Other Magic Entry functions