Skip to content
All library documents

Two Moving Average Crossovers for Buy and Sell Signals

Article MQL5 code base

Summary

This document describes a forex indicator that compares a fast moving average with a slower moving average. It generates a buy signal when the fast average crosses above the slow average, and a sell signal when it crosses below; signals are evaluated at bar close.

The document mentions test results for USD/CHF on a four-hour chart over 2011 and says the displayed tests used default expert-advisor settings without stop-loss or take-profit orders. It provides no performance figures or detailed evaluation, so the examples do not establish profitability or robustness. The approach is a basic trend-following crossover whose signals may lag price changes; the document gives no rules for position sizing or risk control.

Key ideas

  • A buy signal occurs when the fast moving average crosses above the slow moving average at bar close.
  • A sell signal occurs when the fast moving average crosses below the slow moving average at bar close.
  • The document cites testing on USD/CHF four-hour data for 2011 using default settings.
  • The reported tests did not use stop-loss or take-profit orders.

Tags

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