Skip to content
All library documents

Designing a Candle-Reversal Strategy for Automated Parameter Optimization

Article MQL5 articles

Summary

This installment of a multi-currency Expert Advisor series outlines how to add a new strategy to an automated optimization workflow. It introduces SimpleCandles, a contrarian idea: after a configurable run of same-direction closed candles, open a position in the opposite direction when a new bar begins. Each position receives stop-loss and take-profit levels, and the design allows multiple simultaneous positions up to a configurable limit.

The article turns the idea into parameters for optimization, including the candle sequence length, ATR period, stop and target distances, maximum position count, and position sizing. It discusses using fixed point distances or distances scaled to volatility, and notes that virtual positions can support opposing exposures without requiring a hedging account. The surrounding workflow includes adapting a project-creation script, running optimization tasks, and assessing results with a final EA. This section describes the strategy specification and development process; it provides no evidence that the reversal effect is profitable, and the proposed candle pattern remains a hypothesis to test.

Key ideas

  • The strategy looks for a reversal after several closed candles move in the same direction.
  • Signals are evaluated at the start of a new bar, with entries opposite to the preceding candle sequence.
  • Stop loss, take profit, sequence length, and maximum position count are configurable parameters.
  • ATR can provide a volatility-scaled basis for stop and target distances.
  • The proposed reversal tendency requires testing; the article does not establish its profitability.

Tags

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