Trading robot · MT5

Trend Matrix EA

by Rhett-Q

Trend Matrix EA is a multi-model trend-following robot for MetaTrader 5, specifically optimized for Gold trading.

GitHub stars1
Forks0
Last update4 weeks ago19 Aug 2026
LicenceNone stated

Overview

Trend Matrix EA utilizes a scoring matrix based on several technical indicators including Moving Averages, MACD, ADX, and Bollinger Bands to determine entries. The system employs a conservative pyramiding approach, adding positions to existing trades only after they have reached break-even or a significant floating profit. Risk management features include ATR-based stop losses, maximum spread filters, and a mandatory cooling-down period after a stop loss is triggered to prevent overtrading.

Details

Author

Rhett-Q on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Indicator crossover, Mean reversion

Markets

Gold

Timeframes

M15-H1

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

Read from TrendMatrixEA.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpAllowedSymbolstringGOLD_?
InpBaseLotdouble0.01试错仓手数
InpMaxLotdouble0.10单笔加仓上限
InpMaxTotalLotsdouble0.40同向总手数上限
InpMaxPositionsint20最大叠加仓位数(对冲账户)
InpMagiculong26081910魔术号 GOLD_
InpSlippageuint120滑点(点)— 黄金宜偏大
InpMaxSpreadPointsint600最大点差(点),0=不限;3位报价约数百点
InpMaxAddsPerBarint1单根 K 线最多加仓次数
InpFastMAint8快均线
InpMidMAint21中均线
InpSlowMAint55?
Show all 40 inputs
NameTypeDefaultDescription
InpMAMethodENUM_MA_METHODMODE_EMA
InpAtrPeriodint14ATR 周期
InpAdxPeriodint14ADX 周期
InpAdxTrenddouble20.0趋势 ADX 阈值(黄金稍放宽)
InpAdxRangedouble16.0震荡 ADX 阈值
InpHTFENUM_TIMEFRAMESPERIOD_H1高周期过滤
InpUseHTFFilterbooltrue趋势单启用高周期过滤
InpUseBreakoutbooltrue突破
InpUseTripleMAbooltrue三均线排列
InpUseDualMAbooltrue双均线交叉
InpUseKDbooltrueKD ?
InpUseMACDbooltrueMACD
InpUseMaAtrFilterbooltrueMA+ATR 过滤器(趋势单硬门槛)
InpMinEntryScoreint5矩阵最低得分(回测后提高,压频率)
InpTrendBasketOnlybooltrue一篮子只持趋势仓(不开亚盘/震荡回归种子)
InpContOpensSeedboolfalseCONT 当新种子(默认否:只驱动已有篮子加仓)
InpDonchianPeriodint20突破通道周期
InpMaAtrKdouble0.15价格需偏离均线的 ATR 倍数
InpStoKint5
InpStoDint3
InpStoSlowint3
InpStoOSdouble20.0KD ?
InpStoOBdouble80.0KD ?
InpMacdFastint12
InpMacdSlowint26
InpMacdSignalint9
InpBBPeriodint20
InpBBDevdouble2.0

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone Rhett-Q/TrendMatrixEA from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

2 stars

This MetaTrader 5 expert advisor combines Bollinger Band mean-reversion, squeeze breakouts, and EMA crossover trend following. It filters for ranging markets using a long-period EMA slope to execute reversal trades with candlestick confirmation, specifically identifying Doji patterns at the bands. Risk management inclu

MT5 Trading robot Mean reversionBreakoutIndicator crossover
2 stars

This MetaTrader 5 expert advisor focuses on the EURUSD pair using an adaptive market regime approach. It alternates between trend-following and mean-reversion logic based on ADX and EMA indicators. The trend strategy utilizes price breakouts or pullbacks confirmed by RSI, while the range strategy employs Bollinger Band

MT5 Trading robot Trend followingBreakoutMean reversion

Swing Trading EA

by JonusNattapong
1 stars

This expert advisor for MetaTrader 5 implements a medium-term swing trading strategy using multiple technical indicators. It identifies entries through two primary methods: trend reversals and breakouts from consolidation zones. The reversal logic utilizes Fibonacci retracement levels combined with Stochastic and MACD

MT5 Trading robot Trend followingBreakoutMean reversion
Updated 1 year ago None stated GitHub repository of Swing Trading EA

Axuusd Gold Advisor

by damozycodes
1 stars

This expert advisor is designed specifically for trading gold on the MetaTrader 4 platform. It employs a hybrid strategy approach, allowing users to toggle between trend following using moving average crossovers, mean reversion via RSI and Stochastic divergence, and breakout patterns. Trade management includes automate

MT4 Trading robot Trend followingMean reversionBreakout High risk
Updated 8 months ago None stated GitHub repository of Axuusd Gold Advisor

EA31337 Libre

by EA31337
252 stars

EA31337 Libre is an open-source, multi-strategy trading robot for MetaTrader 4 and MetaTrader 5. It functions as a simplified implementation of the EA31337 framework, providing a collection of over 35 built-in strategies based on technical indicators. The expert advisor performs independent market analysis across vario

MT5 Trading robot Multi-strategyTrend followingMean reversion
Updated 1 year ago GPL-3.0 GitHub repository of EA31337 Libre

Scalpflip EA

by anthonycdp
25 stars

Scalpflip EA is an automated scalping robot for MetaTrader 5 that utilizes a multi-layered technical analysis approach. It offers three entry modes: trend-following, mean-reversion, and a smart mode that selects the strategy based on current market conditions. The system filters trades using the Relative Strength Index

MT5 Trading robot ScalpingTrend followingMean reversion
Updated 1 year ago None stated GitHub repository of Scalpflip EA

More trading robots

Need a broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers