Skip to content
All library documents

Calibrating Scale-Out Exit Levels From Historical Maximum Favorable Excursion

Article MQL5 articles

Summary

The article presents a modular way to set partial-exit levels from a strategy's own trade history. For each open position, a tracker records maximum favorable excursion in R, where R is the entry-to-initial-stop distance. When a trade closes, the system saves its MFE sample and realized result. A calibrator then uses selected percentiles from a configurable recent-trade lookback to set the ladder's R-levels and close fractions. Until the minimum sample count is reached, it supplies a predefined fallback ladder.

An executor monitors positions and triggers each partial close once per rung and ticket, accounting for volume constraints and an optional move to breakeven. The article describes a demo EA and a verification script for percentile calculations, lookback handling, and saved samples. It cautions that adaptation after a regime shift takes time, that stale history can still affect calibration, and that tick-accurate backtests are preferable for measuring intrabar MFE. The method calibrates exits; it does not establish that the underlying entry strategy is profitable.

Key ideas

  • Define each trade's MFE in R using the initial stop distance as the risk unit.
  • Persist completed excursion samples and calibrate ladder levels from recent-trade percentiles.
  • Use a fallback ladder until the history contains enough samples for calibration.
  • Track rung execution per ticket to avoid firing the same partial close repeatedly.
  • Historical calibration may lag regime changes, and intrabar MFE requires suitable backtesting data.

Tags

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