Trading robot · MT5

Swing Trading EA

by JonusNattapong

This expert advisor for MetaTrader 5 implements a medium-term swing trading strategy using multiple technical indicators.

GitHub stars1
Forks3
Last update1 year ago8 Apr 2025
LicenceNone stated

Overview

Swing Trading EA 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 confirmations. Risk management features include percentage-based lot sizing, dynamic stop loss placement based on price swings, and take profit targets calculated using a fixed risk-to-reward ratio. The EA is optimized for higher timeframes like H4 and D1 and includes trailing stop functionality.

Details

Author

JonusNattapong on GitHub

Type

Trading robot

Strategy

Trend following, Breakout, Mean reversion, Indicator crossover

Markets

Forex

Timeframes

H4 and above

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

NameTypeDefaultDescription
TimeFrameENUM_TIMEFRAMESPERIOD_H4Trading timeframe (H4 or D1)
RiskPercentdouble1.0Risk per trade (% of account)
StochPeriodKint5Stochastic %K period
StochPeriodDint3Stochastic %D period
StochSlowingint3Stochastic slowing
MACDFastint12MACD fast EMA period
MACDSlowint26MACD slow EMA period
MACDSignalint9MACD signal period
UseReversalbooltrueUse reversal strategy
UseBreakoutbooltrueUse breakout strategy
FiboRetracementPeriodint20Period for Fibonacci retracement calculation
ReversalFiboLevel1double38.2Fibonacci level 1 (%)
Show all 17 inputs
NameTypeDefaultDescription
ReversalFiboLevel2double50.0Fibonacci level 2 (%)
ReversalFiboLevel3double61.8Fibonacci level 3 (%)
StochOverboughtint80Stochastic overbought level
StochOversoldint20Stochastic oversold level
TPRatiodouble2.0Risk:Reward ratio for Take Profit

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone JonusNattapong/SwingTrading 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

Trend Matrix EA

by Rhett-Q
1 stars

Trend Matrix EA is a multi-model trend-following robot for MetaTrader 5, specifically optimized for Gold trading. It 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, addi

MT5 Trading robot Trend followingBreakoutIndicator crossover
Updated 2 months ago None stated GitHub repository of Trend Matrix 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 9 months ago None stated GitHub repository of Axuusd Gold Advisor

EA31337 Libre

by EA31337
256 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 2 years ago GPL-3.0 GitHub repository of EA31337 Libre

Scalpflip EA

by anthonycdp
27 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 trend-following EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers