Skip to content
All library documents

A Daily Breakout Expert Advisor with Bar Filters and Averaging

Article MQL5 code base

Summary

This document describes an expert advisor that checks for breakouts around a reference level set from the opening price of the day. On a new bar, it can open a buy when the previous bar is bullish and price crosses above the reference plus a configured point distance; it can open a sell when the previous bar is bearish and price breaks the corresponding threshold. A worked buy example illustrates how the point distance is added to the daily opening level.

The parameters include minimum and maximum previous-bar body sizes and a limit on how many positions may open at one time. The strategy also mentions averaging and trailing, but gives no detailed rules for either feature, nor does it specify position sizing, stop placement, or exposure limits. The document supplies no historical results or risk analysis and recommends trying the advisor on a demo account. Its mechanics are described for an hourly chart, but the instrument and broker point conventions are not fully explained.

Key ideas

  • The advisor evaluates break conditions when a new bar begins, using the day's opening price as its reference.
  • Bullish and bearish previous bars determine the trade direction when the configured point threshold is crossed.
  • Minimum and maximum bar-body filters can restrict eligible breakouts.
  • A parameter controls how many positions may open on each breakout event.
  • Averaging and trailing are mentioned without enough detail to assess their risk or implementation.

Tags

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