Skip to content
All library documents

Adjusting Trade Size After Recent X2MACandle Losses

Article MQL5 code base

Summary

The document describes an Expert Advisor that trades signals from the X2MACandle indicator. Signals are generated when a bar closes and the candle color indicates a trend change. Its position-sizing rule reviews recent trades separately for buys and sells; when enough trades in that direction have been losses, the next trade uses a smaller lot size, otherwise it uses the normal size. The parameters let the user set the number of trades reviewed, the loss threshold, the reduced and normal sizing values, and the sizing mode.

An example configuration uses the last five trades and reduces size when three are losses, with stated sizes of 0.01 and 0.1 lots. The document mentions test results for USDJPY on a six-hour chart during 2017, but provides no readable performance statistics or detailed evaluation. It says the displayed tests used default EA inputs without stops. The method therefore describes a sizing response to recent outcomes, but does not establish profitability or explain how the chosen thresholds were validated. Required indicator files must also be available for the EA to run.

Key ideas

  • The EA enters when a bar closes and X2MACandle signals a trend change through candle color.
  • Buy and sell trade histories are evaluated independently for position sizing.
  • A sufficient number of recent losses triggers reduced size for the next trade in that direction.
  • The example uses five recent trades and a threshold of three losses, with two stated lot sizes.
  • The document references a 2017 USDJPY test but supplies no detailed performance statistics.

Tags

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