Back to contents

Magic Entry · MT5 trade manager

Closing positions in MT5: partial close, Close All and groups in Magic Entry

Close on the entry card opens the volume editor: set how much to close in money, lots or percent, and CLOSE NOW closes that part at market. Close All does the same for every position on the symbol. Group gathers positions into buys and sells with a shared stop, take, break-even and trailing; Pick joins selected positions into a pool.

Close

Close part of a position now

Close on the entry card opens the volume editor. Set how much to close — in money, lots or percent — and close that part at market with one button. The volume on the level cards drops right away.

  • The three fields are linked: change one and the others recalculate.
  • The arrows change the value step by step.
  • CLOSE NOW closes the chosen volume at market; the rest is split between the levels in the same proportions.
Key C, Z / X
Close All

Close part of the volume of all positions

With two or more cards in the Positions panel (a group card counts as one), Close All appears in its header. It opens the same volume menu as Close on a position, but for all positions on the symbol at once.

  • Volume is set in money, lots or percent.
  • Positions close one by one, with a counter under the entry buttons.
  • Close All leaves pending orders untouched.
  • If the broker's response is unclear, the advisor stops and does not retry blindly.
Group

Group all positions

The arrows button in the Positions header gathers the symbol's positions into two groups: buys and sells. A group has a combined volume, a combined result and one set of protection for all.

  • All positions in a group get a shared stop, take, breakeven and trailing.
  • If even one position cannot take these levels, grouping does not turn on.
  • New trades in the same direction inherit the group's plan.
  • Move a group level and it changes for all its positions.
  • The group card has a star and C on the right: pin the group and close only it. The shared entry has no Close button.
Pick

Pool positions together

When three or more positions are open in one direction, a select button appears in the header. Mark the cards you want and confirm: they become a pool with shared protection, and the rest stay on their own.

  • Pools are named P1, P2 and so on; the pool card shows its shared levels.
  • The pool takes its protection from the oldest selected position.
  • The arrows button on the pool card dissolves it; the protection stays on each position. Next to it are the star and C: pin the pool and close only it.
  • Esc or any other button exits selection mode.

How to close and group positions

  1. Select a position card, click Close on the entry card, set the part (Z and X change it by 10%) and press CLOSE NOW. The C key skips the editor and closes the part that is set right away; a repeat within 3 seconds is ignored.
  2. To group, click the arrows button in the Positions header: buys and sells become two groups with one set of protection each.
  3. With three or more positions in one direction, click Pick, mark the cards and confirm to make a pool (P1, P2…).
  4. With two or more positions (or in group mode), Close All in the Positions header closes a part of every position on the symbol; C on a group card opens a close menu for that group only.

Example: closing half of a 0.30-lot position

Set 50% in the Close editor: the lots field shows 0.15 and the money field the matching amount, because the three fields are linked. CLOSE NOW closes 0.15 lot at market, and the remaining 0.15 lot is split between the levels in the same proportions as before.

  • Close All closes positions one by one with a counter and leaves pending orders untouched.
  • If the broker’s response is unclear, the advisor stops and does not retry blindly.
  • A pool takes its protection from the oldest selected position; dissolving it keeps the protection on each position.

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.

  • Close NowHOTKEY_CLOSE_NOWDefault: C

    Close the selected share of the position now; a repeat within 3 seconds after the close won't fire. If a group is selected, C opens its close menu.

  • Add 10% to Close NowHOTKEY_CLOSE_NOW_ADDDefault: Z

    +10% to the open position's Close Now share. Closes nothing. For a group, +10% in its close menu.

  • Reduce Close Now by 10%HOTKEY_CLOSE_NOW_REDUCEDefault: X

    −10% to the Close Now share.

  • Restore position pools on loadRESTORE_POSITION_POOLSDefault: ON

    Remembers which positions you grouped and which cards you pinned, and restores them on the same chart after the terminal restarts. A group comes back only if its positions and levels haven't changed; otherwise the positions stay separate. Nothing is sent to the broker.

Other Magic Entry functions