Skip to content
All library documents

A Single-Position Momentum Expert Advisor Using Moving Average and Momentum

Article MQL5 code base

Summary

This document describes a MetaTrader expert advisor that combines a moving average with a Momentum indicator. It evaluates signals when a new bar forms, uses the previous bar's close and the current bar's open when opening positions, and refers to prior closes and current-bar highs or lows when closing or trailing them. The design permits only one open position at a time.

For optimization, the author recommends a genetic algorithm and one-minute OHLC tick generation. The text points to a USDJPY hourly example and says that example was checked using real-tick-based testing, but it does not provide performance statistics or enough detail to reproduce the parameter search. These settings are recommendations for testing, not evidence of general profitability, and the document gives no broader validation across instruments or time periods.

Key ideas

  • The expert advisor uses moving average and Momentum indicators.
  • It evaluates trading logic only when a new bar forms.
  • The system allows at most one position to be open at a time.
  • The author recommends genetic optimization and describes a USDJPY hourly example, without reporting performance results.

Tags

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