Discussing the article: "Automating Trading Strategies in MQL5 (Part 10): Developing the Trend Flat Momentum Strategy"

 

Check out the new article: Automating Trading Strategies in MQL5 (Part 10): Developing the Trend Flat Momentum Strategy.

In this article, we develop an Expert Advisor in MQL5 for the Trend Flat Momentum Strategy. We combine a two moving averages crossover with RSI and CCI momentum filters to generate trade signals. We also cover backtesting and potential enhancements for real-world performance

The Trend Flat Momentum Strategy is designed to capture market trends by blending a simple moving average crossover system with robust momentum filtering. The core idea is to generate buy signals when a fast-moving average crosses above a slower-moving average—suggesting a bullish trend—while confirming the signal with momentum indicators, which are an RSI and two different CCI values. Conversely, a short trade is signaled when the fast-moving average exceeds the slow-moving average and the momentum indicators confirm bearish conditions. The indicator settings are:

  • Commodity Channel Index (CCI) (36 Periods, Close)
  • Commodity Channel Index (CCI) (55 Periods, Close)
  • Slow Relative Strength Index (RSI) (27 Periods, Close)
  • Moving Average Fast (11 Periods, Smoothed, Median Price/2)
  • Moving Average Fast (25 Periods, Smoothed, Median Price/2)

As for the exit strategy, we will place the stop loss at the previous swing low for a long trade and the previous swing high for a short trade. Take profit will be at a predetermined level, 300 points from the entry price. This multi-faceted approach will help filter out false signals and aims to improve the quality of trade entries by ensuring that trend direction and momentum are aligned. In a nutshell, the visualization below depicts the simplified strategic plan.

STRATEGY PLAN

Author: Allan Munene Mutiiria