Trading robot · MT4

Sanqing EA

by caoruihua

An automated trading system for MetaTrader 4 specifically designed for gold (XAUUSD) on the M5 timeframe.

GitHub stars3
Forks0
Last update5 months ago7 Apr 2026
LicenceNone stated

Overview

Sanqing EA features two core strategies: trend continuation and price pullbacks. The expert advisor utilizes a dual exponential moving average framework for direction and ATR for volatility filtering. Risk management is handled through fixed lot sizing, maximum daily trade counts, and hard currency-based daily profit and loss limits. Trades are protected by dynamic stop loss and take profit levels that move in favor of the position once specific profit thresholds are reached.

Details

Author

caoruihua on GitHub

Type

Trading robot

Platform

MetaTrader 4 (MQL4)

Strategy

Trend following, Mean reversion, Indicator crossover

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 StrategySelector.mq4. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
MagicNumberint20260313订单魔术号
LogLevelint1日志等级
MaxTradesPerDayint30日?
DailyProfitStopUsddouble50.0日净收益达到该值后锁定
DailyLossStopUsddouble40.0日亏损达到该值后锁定
FixedLotsdouble0.01统一固定手数
EMAFastPeriodint9快 EMA 周期
EMASlowPeriodint21?
LowVolAtrPointsFloordouble300.0低波动门控:ATR(14)换算为points后的最小阈值
LowVolAtrSpreadRatioFloordouble3.0低波动门控:ATR(points)/Spread(points)最小比值
Slippageint30下单滑点
MaxRetriesint6执行重试次数

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone caoruihua/sanqing-ea from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts.
  3. 3Copy the filesCopy the .mq4 file into Experts, and any .mqh files into the Include folder the code expects.
  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

OwaisQuadri MT4 Code

by OwaisQuadri
6 stars

This MetaTrader 4 expert advisor executes trades based on momentum oscillators, trend filters, and price action patterns. It utilizes a Stochastic oscillator alongside multiple Exponential Moving Averages to identify entry points in alignment with the prevailing trend. The logic incorporates candlestick analysis, speci

MT4 Trading robot Indicator crossoverTrend followingMean reversion
Updated 6 years ago None stated GitHub repository of OwaisQuadri MT4 Code

Tre Boll Trend

by linbirg
3 stars

Tre Boll Trend is a MetaTrader 4 Expert Advisor designed to identify and trade market trends using multi-timeframe Bollinger Band analysis. The system processes data from timeframes ranging from five minutes to one day, calculating advanced metrics such as price velocity, acceleration, and standard deviation. It monito

MT4 Trading robot Trend followingIndicator crossoverMean reversion
Updated 7 years ago None stated GitHub repository of Tre Boll Trend

Edelweiss EA

by Attornado
3 stars

Edelweiss EA is an educational trading robot for MetaTrader 4 that utilizes a multi-indicator framework to generate buy and sell signals. It combines exponential moving averages, stochastic oscillators, the awesome oscillator, ADX, and Bollinger Bands to identify market entries. Trade management includes dynamic ATR-ba

MT4 Trading robot Indicator crossoverMean reversionTrend following
Updated 11 months ago MIT GitHub repository of Edelweiss EA

Siluman Kambing

by rajaculaemas
2 stars

This MetaTrader 4 expert advisor implements a multi-strategy approach for trading various currency pairs and gold. It combines technical indicators including Moving Averages, RSI, Bollinger Bands, and ADX with price action concepts such as support, resistance, and engulfing patterns. The EA features risk management too

MT4 Trading robot Trend followingMean reversionIndicator crossover
Updated 1 year ago None stated GitHub repository of Siluman Kambing

Ray Scalper

by ThePathsOfSaga
2 stars

Ray Scalper is an automated expert advisor for MetaTrader 4 that uses technical indicators to trade both trend-following and counter-trend strategies. It monitors Bollinger Bands, Moving Averages, and Stochastic crossovers to trigger entries. The robot allows users to toggle between trend and anti-trend modes and inclu

MT4 Trading robot ScalpingIndicator crossoverTrend following
Updated 6 years ago None stated GitHub repository of Ray Scalper

Puer Tigris

by PuerTigris
1 stars

Puer Tigris is a MetaTrader 4 expert advisor that implements multiple entry strategies, primarily focusing on Bollinger Bands mean reversion. It features a martingale lot scaling system where position sizes are multiplied after a trade is closed, with a configurable limit on the number of recovery levels. The robot use

MT4 Trading robot MartingaleMean reversionIndicator crossover High risk
Updated 4 months ago None stated GitHub repository of Puer Tigris

More trading robots

Need a broker for MT4?

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

Compare brokers