Skip to content
All library documents

Two Moving Average Crossover Rules for a Trading Bot

Article MQL5 code base

Summary

This document describes a basic crossover strategy for an automated trading system. It compares a faster moving average with a slower one: a move of the fast average above the slow average triggers a buy, while a move below it triggers a sell. The idea is to use changes in the relationship between two smoothed price series as trade signals.

The text says the strategy can be used in MetaTrader 4 or MetaTrader 5 and identifies it as automatically generated by a visual strategy builder. It provides no parameter settings, market or timeframe guidance, backtest results, or risk controls. As presented, the crossover rules are only a simple starting point; the document does not establish profitability or explain how to handle position sizing, transaction costs, or false signals in sideways markets.

Key ideas

  • The strategy compares a fast moving average with a slow moving average.
  • A cross above the slow average generates a buy signal.
  • A cross below the slow average generates a sell signal.
  • The document gives no performance evidence or risk management rules.

Tags

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