Skip to content
All library documents

Daily High-Low Trading with Moving Average Filters

Article MQL5 code base

Summary

This Expert Advisor checks for an entry once per day at a configured time. It finds the highest high and lowest low in a user-defined historical interval, with a shift that moves the interval back from the current bar. The relative positions of those extremes against fast and slow moving averages provide additional entry conditions.

The document describes adjustable trade sizing, stop loss, take profit, and trailing stop settings, alongside the entry time and price-window parameters. It recommends initially optimizing only the start hour, interval shift, and interval width. It identifies USDJPY on the hourly chart as a testing context, but provides no performance results, detailed entry rules, or evidence that the approach is profitable. The moving average settings and risk controls are configurable, so their effects would need separate evaluation.

Key ideas

  • The Expert Advisor checks entry conditions at a specified time and opens at most one position per day.
  • It identifies the highest high and lowest low within a shifted historical interval.
  • Fast and slow moving averages add filters based on the locations of those extremes.
  • The initial optimization should focus on the start hour, interval shift, and interval width.
  • Trade size, stop loss, take profit, and trailing stop are configurable.

Tags

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