Skip to content
All library documents

Combining MACD and Stochastic Signals in a Forex Expert Advisor

Article MQL5 code base

Summary

This document describes a forex Expert Advisor that combines MACD and Stochastic indicators. It limits entries to one position per bar and uses three configurable time windows to determine when entries may occur. Its settings include an option to disable Stochastic, a bar lookback for that signal, and trade-management controls such as fixed stop loss and take profit, trailing stops, a breakeven threshold, and a maximum position count.

The reported backtest table covers multiple currency pairs over a period in 2017 and shows mixed results: several pairs were profitable while others lost money, with varied drawdowns and profit factors. This illustrates that the approach did not perform uniformly across markets in that sample. The document does not explain the exact indicator entry logic, parameter selection, trading costs, or whether the settings were optimized on the reported period. The results are historical tests only and do not establish robustness or future profitability.

Key ideas

  • The Expert Advisor combines MACD and Stochastic indicators to generate forex entries.
  • It restricts entries to one position per bar and uses three configurable trading periods.
  • Trade controls include stop loss, take profit, trailing stop, breakeven, and a position limit.
  • The reported backtest results differ substantially across currency pairs, including losses on some pairs.
  • The document omits detailed entry rules and evidence of out-of-sample robustness.

Tags

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