Skip to content
All library documents

DeMarker-Gated Forex Grid with Progressive Position Sizing

Article MQL5 code base

Summary

The system opens an initial position at a fixed lot size when the DeMarker indicator permits entry. If a position is already open and price moves a specified distance from the most recent entry, another position may be added when the indicator again allows it. Added positions scale the previous position’s size by a coefficient, creating progressive exposure. There is no configured take profit, and the default stop loss is set very wide; standard trailing stops and equity-based trailing controls are available.

The document reports M5 backtests across multiple forex pairs on a stated $10,000 deposit, comparing whether the reference price resets after each closing trade. Results vary sharply by symbol and reset setting, with some tests profitable and others showing losses and very large drawdowns. These results are historical tests, not evidence of robustness; the scaling approach, wide stop, and uneven outcomes indicate substantial risk.

Key ideas

  • DeMarker permission gates both initial entries and additions after price moves a configured distance.
  • The initial trade uses a base lot size, while later positions scale from the latest position’s volume.
  • The system offers trailing stops and equity-based trailing controls, with no take-profit setting described.
  • Backtests across currency pairs show highly varied outcomes, including large drawdowns and losses.

Tags

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