Skip to content
All library documents

Adding Adjustable Sizing, Order Entry, and Trade Management to Manual Backtests

Article MQL5 articles

Summary

This article describes expanding an on-chart expert advisor for manual strategy testing in MetaTrader 5. It adds controls for changing position size during a test, submitting buy and sell stop or limit orders at user-adjusted prices, and managing individual positions. The lot adjustment uses increment and decrement buttons and enforces the instrument's minimum size. The order workflow displays a proposed entry price, lets the user adjust it, and provides confirmation, cancellation, and order deletion controls.

The trade manager supports selecting a position and adjusting its stop loss or take profit, then confirming, canceling, or closing that position. The article explains the interface logic and the implementation challenges involved, including the author’s difficulty making the lot field directly editable. Its evidence is a description of the implemented controls and their behavior, rather than a measured evaluation of strategy quality or backtest accuracy. These features make manual experiments easier to control, but they do not themselves demonstrate that a strategy is profitable or that simulated execution matches live trading.

Key ideas

  • On-chart lot controls can change trade size during a visual backtest without restarting it.
  • Order entry can support stop and limit orders by letting users adjust an entry price before confirming.
  • A position manager can modify or close a selected trade without affecting every open position.
  • The described interface improves control over manual testing but provides no evidence of strategy performance.
  • The author reports that direct editing of the lot size field remained unresolved.

Tags

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