Skip to content
All library documents

A Gap Trading EA with Threshold and Trade Management Settings

Article MQL5 code base

Summary

This document describes an expert advisor that detects price gaps on a selected timeframe and opens a position according to the gap's direction. A newly formed bar triggers the check; the measured gap is compared with a configurable threshold before the EA decides whether to trade. The user can specify position size, stop loss, take profit, and whether trailing stops are enabled. The description recommends running the EA on a one-minute chart while monitoring gaps formed on the selected timeframe.

The only performance-related detail is a statement that EUR/USD showed its highest profit on a six-minute timeframe. No test period, profit figure, comparison method, transaction costs, or risk statistics are supplied, so that claim cannot establish robustness. The document also does not explain how gaps are defined, how the threshold is chosen, or whether trades close on an opposing gap. These omissions limit reproducibility and make the result unsuitable as evidence of expected live performance.

Key ideas

  • The EA checks for a gap when a new bar appears on a chosen timeframe.
  • It compares the gap with a configurable threshold and trades in the gap's direction.
  • Position size, stop loss, take profit, and trailing behavior are configurable.
  • The document mentions EUR/USD performance on a six-minute timeframe but gives no supporting test details.

Tags

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