Trading robot · MT5

Moving Average Hedging EA

by duyng219

This MetaTrader 5 expert advisor implements a trend-following strategy based on price position relative to a moving average.

GitHub stars1
Forks0
Last update2 years ago17 Sep 2024
LicenceNone stated

Overview

Moving Average Hedging EA initiates buy orders when a candle closes above the moving average and sell orders when it closes below. Risk management is handled through several configurable parameters, including fixed take profit, break-even logic, and trailing stops. Users can choose between a fixed-point stop loss or a dynamic stop loss based on the distance from the moving average. The repository provides versions compatible with both hedging and netting account types.

Details

Author

duyng219 on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Indicator crossover, Hedging

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

  • Holds opposite positions at once

Input parameters

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

NameTypeDefaultDescription
MagicNumberulong101
MAPeriodint30
MAShiftint0
MAMethodENUM_MA_METHODMODE_SMA
MAPriceENUM_APPLIED_PRICEPRICE_CLOSE
FixedVolumedouble0.1
SLFixedPointsint0
SLFixedPointsMAint200
TPFixedPointsint0
TSLFixedPointsint0
BEFixedPointsint0

How to install it

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

Forex Pro EA

by hqs-triet
3 stars

This MetaTrader 5 expert advisor serves as an educational repository for various automated trading strategies and capital management techniques. It features a modular architecture allowing users to toggle between multiple entry algorithms, including EMA crossovers, MACD zero-crossings, and a combination of ADX and Boll

MT5 Trading robot Indicator crossoverHedgingTrend following
Updated 2 years ago MIT GitHub repository of Forex Pro EA

STO Martin

by crq644
2 stars

STO Martin is a grid-based trading robot for MetaTrader 5 that uses technical indicators to manage entries and recoveries. It employs a Stochastic Oscillator for execution signals and a Moving Average to filter trades according to the prevailing trend. The EA features a martingale lot-scaling system that adds positions

MT5 Trading robot MartingaleGridTrend following High risk
Updated 3 years ago None stated GitHub repository of STO Martin

Xauusd Auto Trader

by ibadnarpatih-create
2 stars

This MetaTrader 5 expert advisor is designed for trading XAUUSD using a trend-following approach. It identifies entries through a triple Exponential Moving Average crossover system, requiring ADX momentum confirmation before opening positions. To manage losing trades, the EA employs a martingale strategy that layers or

MT5 Trading robot Trend followingIndicator crossoverMartingale High risk
Updated 3 weeks ago GPL-3.0 GitHub repository of Xauusd Auto Trader

Experienced FX Trader

by simonokwundue-ops
1 stars

This collection of Expert Advisors for MetaTrader 5 provides high-frequency scalping and multi-strategy automated trading across multiple currency pairs. The robots utilize a signal scoring system based on moving average crossovers, RSI momentum, Bollinger Band breakouts, and MACD signals. The suite includes a dedicate

MT5 Trading robot ScalpingBreakoutIndicator crossover
Updated 10 months ago None stated GitHub repository of Experienced FX Trader

EA Max Profit

by diditgravatar
1 stars

This MetaTrader 5 expert advisor is designed specifically for trading XAUUSD. It utilizes a combination of the Average Directional Index (ADX) for trend strength, Relative Strength Index (RSI) for momentum, and two Simple Moving Averages for trend direction. The system uses multi-timeframe analysis, specifically checki

MT5 Trading robot Indicator crossoverTrend followingMean reversion
Updated 1 year ago None stated GitHub repository of EA Max Profit

Yumokin CCI

by yumokin
1 stars

This automated trend-following expert advisor for MetaTrader 4 is designed specifically for the GBPJPY pair on the H1 timeframe. It identifies market entries using the Commodity Channel Index and Moving Average Convergence Divergence indicators. The system operates within specific GMT hours and manages a maximum of two

MT4 Trading robot Trend followingIndicator crossoverHedging
Updated 7 years ago None stated GitHub repository of Yumokin CCI

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