Skip to content
All library documents

Manual Multi-Instrument Position Management with a Trading Panel

Article MQL5 code base

Summary

The document explains a manual trading panel for opening and closing positions across several instruments. Users select symbols, volumes, and trade directions in separate fields; unselected symbol boxes are ignored. When a symbol changes, the panel updates its lot limits and default increments based on that instrument’s minimum lot size. Volume and direction are needed to open a position, while closing acts on the whole position for each selected symbol regardless of those fields.

The panel supports between one and five symbol boxes, with other values falling back to two. The source also describes partial closure by opening an opposing deal and selective closure by leaving the boxes for positions to retain unselected. This is an operational tool description, not a hedging strategy or performance analysis; it gives no guidance on exposure sizing, execution costs, or risk limits.

Key ideas

  • The panel lets a trader manually open or close positions across selected instruments.
  • Unselected symbol boxes are ignored when the panel buttons are used.
  • Changing a symbol recalculates lot limits and defaults for that instrument.
  • Closing a selected symbol closes the entire position, regardless of volume or direction fields.
  • The panel describes opposing trades for partial closure but provides no risk or performance analysis.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.