Skip to content
All library documents

Dynamic Averaging Grid Strategy and Its Risks

Article MQL5 code base

Summary

Ilan 1.6 Dynamic is a forex expert advisor that averages into losing positions, increasing trade size as price moves against the initial entry. It sets the next entry distance from the recent high–low range, then seeks a small reversal to close the basket at a shared take-profit level. RSI thresholds can filter entries, and optional exits include stop-loss, trailing stop, time limits, CCI signals, and account-equity thresholds.

The document describes configurable trade limits, lot scaling, and backtest modes, and gives EURUSD and other major pairs as suggested markets on an M15 chart. It provides no independent performance evidence; it cautions that results depend on the market, timeframe, broker, test period, and settings. Persistent directional moves can create large floating losses and eventually a margin call, especially with aggressive lot scaling. The strategy is therefore intended for flat conditions, and the default settings assume five-digit quotes. The EA also depends on a hedging library to manage multiple positions in MetaTrader 5.

Key ideas

  • The EA adds positions at dynamically calculated price intervals when price moves against the current basket.
  • Trade size can increase with each added position, raising exposure during adverse moves.
  • A shared take-profit aims to close the basket after a price retracement.
  • Optional exits include stop-loss, trailing stop, time-based, CCI-based, and equity-based controls.
  • Backtest outcomes vary by market conditions and settings, and sustained trends can lead to severe losses.

Tags

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