Skip to content
All library documents

RSI Extremes and Martingale Position Sizing in an Advisor

Article MQL5 code base

Summary

This trading advisor uses the Relative Strength Index to identify possible entries. It examines a configurable recent window of candles and buys when RSI reaches its minimum within that window, or sells when RSI reaches its maximum. Positions are closed at take-profit or stop-loss levels specified in points.

The advisor can also increase lot size during adverse reversals through an optional martingale feature, controlled by an activation setting and a multiplier. The document gives no details about the signal-filtering section, precise position-sizing rules, market or timeframe, or test results. It describes the strategy’s basic mechanics but does not establish profitability; the martingale feature can also increase exposure as losses accumulate.

Key ideas

  • The advisor searches a configurable recent candle window for RSI extremes.
  • It opens buys at local RSI minima and sells at local RSI maxima within that window.
  • Take-profit and stop-loss settings determine when positions close.
  • An optional martingale setting increases lot size during reversals, but no risk limits or performance evidence are provided.

Tags

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