Skip to content
All library documents

Moving-Average Crossovers with a Loss-Retention Position Limit

Article MQL5 code base

Summary

This expert-advisor description presents a moving-average crossover system: it opens trades when a fast average crosses a slow average and closes them when the signal reverses. Its distinctive setting changes how losing positions are handled. When loss closing is disabled, the system keeps losing trades open through a reverse signal and opens new positions, while moving the losing trades’ take-profit levels to their entry prices.

A maximum-position setting limits how many trades can be opened during this period of holding through losses, and trade-transaction events are used to track the type of position opened. The text lists position volume, position limit, loss-closing choice, and a unique identifier as inputs. It provides a qualitative description and points to an example, but supplies no performance data, market, timeframe, moving-average specifications, or risk analysis. The approach may keep losing exposure open while adding positions, so the stated cap is a key constraint rather than evidence that the method controls drawdown.

Key ideas

  • The system opens positions on fast and slow moving-average crossovers and exits on reverse signals.
  • Disabling loss closure keeps losing positions open when a reverse signal appears.
  • The described loss-handling mode opens new trades and moves losing positions’ take-profit levels to entry.
  • A maximum-position input limits additional positions during the period of holding through losses.
  • The description provides no backtest results or detailed market assumptions.

Tags

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