Skip to content
All library documents

Researching Session Breakouts with Range-Based Stops and Trade Filters

Article MQL5 code base

Summary

This document describes an H1 breakout research tool that builds a price box from a chosen number of hourly candles, using GMT-adjusted session times. When the box is complete, it places buy-stop and sell-stop orders beyond its boundaries. Researchers can vary the session, entry offset, stop loss and take profit, and test breakeven, trailing-stop, time-exit, order-expiration, and weekday rules. Position size is set from a risk percentage, calculated using account balance when the tool starts.

The document outlines a sequential study of range settings and trade management, followed by forward testing of a selected configuration. It does not provide the referenced optimization or forward-test figures, so no performance conclusion can be drawn from the text. It also cautions that the example is not a recommendation and that the tool needs further validation, including out-of-sample testing. Results may depend on the chosen session, parameters, weekday filters, and the balance-based sizing assumption.

Key ideas

  • A range is formed from a configurable count of H1 candles using GMT-adjusted session times.
  • Buy-stop and sell-stop orders are placed beyond the box, with an optional entry offset and expiration.
  • Stops and exits can be varied using fixed distances, box-size coefficients, breakeven, trailing, and time rules.
  • Weekday filters and risk-based sizing support research into calendar effects and exposure.
  • The example mentions forward testing but supplies no results, and its settings require independent validation.

Tags

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