Skip to content
All library documents

A Bar-Change Forex Expert Advisor with Loss-Based Lot Increases

Article MQL5 code base

Summary

This description explains a EUR/USD expert advisor that compares opening prices from two bars at configurable shifts. When the difference exceeds a direction-specific threshold, it opens a long or short position. It includes configurable take-profit and stop-loss distances, initial position size, optional proportional sizing, a multiplier for increasing lots after losses, and controls for entry hour and maximum holding time. The author also describes settings that determine whether lot multiplication occurs once after a loss or on successive openings.

The page refers to tester visuals and a result for one month in 2012, but supplies no numerical performance details in the text. Increasing position size after losses creates a loss-recovery or martingale-like exposure pattern: it can magnify drawdowns and does not guarantee recovery. The description does not provide enough detail to assess execution assumptions, maximum exposure, or robustness across market conditions. The stated bar comparison, risk parameters, and sizing rules would need careful evaluation before practical use.

Key ideas

  • The advisor triggers trades when the open-price difference between two selected bars exceeds a long or short threshold.
  • It provides separate profit targets and stop losses for long and short positions.
  • Position size can be configured or increased by a multiplier after losses.
  • Entry time and maximum position lifetime are configurable parameters.
  • The page mentions tester visuals but gives no numerical evidence of strategy performance.

Tags

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