Skip to content
All library documents

Two Moving Average Crossovers on a Higher Timeframe

Article MQL5 code base

Summary

This document describes a simplified expert advisor that trades intersections between two custom moving average indicators configured for another timeframe. It compares the indicator values on the previous completed bar and the current bar to identify a crossing, then opens a position based on that signal. The description does not specify the moving average periods, the precise direction rules, or how the other timeframe is selected.

Positions use a constant lot size, with no stop loss, take profit, or trailing stop. A position remains open until an opposite signal appears, so risk management and exit timing depend entirely on that reversal. An optional logging feature records operations. The material outlines the basic signal and trade handling, but supplies no performance results, historical tests, market selection, or details about execution costs. It is therefore a minimal strategy specification rather than evidence that the approach is profitable or robust.

Key ideas

  • The strategy uses intersections between two moving average indicators configured for another timeframe.
  • It checks indicator values across adjacent bars to detect a crossing.
  • Positions are opened using a constant lot size.
  • Trades close only after an opposite signal because no protective or profit-taking orders are defined.
  • The description provides no backtest or live performance evidence.

Tags

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