Skip to content
All library documents

On-Chart Risk Sizing, Order Execution, and Trade Management

Article MQL5 code base

Summary

The document describes a MetaTrader 5 Expert Advisor with a chart-based panel for calculating trade size and managing orders. Its sizing method uses a user-set percentage of account equity and the stop-loss distance to determine lot size. The panel also offers one-click buy and sell orders with stop-loss and take-profit levels attached.

Management controls include closing positions associated with the EA’s magic number, moving stops on winning positions to entry, and trailing stops according to configured distance and step settings. These features aim to reduce manual calculations and speed routine actions. The description gives no formula details, execution safeguards, broker-specific behavior, or performance evidence; traders would need to assess those details before relying on the tool in live conditions.

Key ideas

  • Position size is calculated from account equity, a chosen risk percentage, and stop-loss distance.
  • The panel can place buy or sell orders with configured stop-loss and take-profit levels.
  • A close-all control targets positions associated with the EA’s magic number.
  • Break-even and trailing-stop controls adjust protective exits on active positions.
  • The document describes features but gives no evidence about execution quality or risk-calculation accuracy.

Tags

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