Trading robot ยท MT5

Awrafx Trendline Divergence Breakout

by sapuann

This MetaTrader 5 expert advisor executes a multi-stage trading strategy focusing on H1 trendline breakouts and RSI divergences.

GitHub stars2
Forks0
Last update6 months ago3 Mar 2026
LicenceNone stated

Overview

Awrafx Trendline Divergence Breakout refines entries on the M5 timeframe using Change of Character and micro Break of Structure signals. The EA includes automated risk management with percentage-based lot sizing and ATR-based stop losses. It features a triple take-profit system with partial closing capabilities. Trade filters include a 200 EMA trend filter, session timing, and volatility gates based on ATR. The strategy requires both H1 and M5 data to confirm signals.

Details

Author

sapuann on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

SMC / ICT / price action, Breakout, Trend following, Mean reversion

Markets

Gold, Forex

Timeframes

M15-H1, M1-M5

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

NameTypeDefaultDescription
InpSymbolsstringXAUUSDComma-separated symbols
InpRSI_Periodint14RSI Period
InpEMA_Periodint200EMA Period
InpATR_Periodint14ATR Period
InpPivotBarsint5Bars each side for pivot
InpMinRSIDeltadouble3.0Min RSI delta for divergence
InpMinDivSpanint5Min bars between pivots
InpMaxDivSpanint50Max bars between pivots
InpTrendATRMultdouble2.0ATR multiplier for trend strength
InpMinScoreint60Minimum score for signal
InpMaxSpreaddouble50Max spread in points
InpWriteCSVbooltrueWrite audit CSV
Show all 40 inputs
NameTypeDefaultDescription
InpCHoCHTimeoutint20Max H1 bars to wait for CHoCH
InpCHoCHTolATRdouble0.05CHoCH tolerance as fraction of ATR (small buffer)
InpRetestTimeoutint120Max M5 bars to wait for retest (120 = ~10 hours)
InpRetestTolATRdouble0.10Retest touch zone tolerance as fraction of M5 ATR
InpMicroBOSTimeoutint60Max M5 bars to wait for micro-BOS
InpMicroPivotBarsint3Bars each side for M5 micro pivot detection
InpRiskPercentdouble1.0Risk per trade in %
InpSL_Buffer_ATR_M5double0.5SL buffer as fraction of M5 ATR
InpMaxSL_ATR_H1double3.0Reject entry if SL > this multiple of H1 ATR
InpMinRRdouble1.5Minimum room-to-move ratio vs SL
InpTP1_ATR_H1double1.5TP1 multiple of H1 ATR
InpTP2_ATR_H1double2.5TP2 multiple of H1 ATR
InpTP3_ATR_H1double4.0TP3 multiple of H1 ATR
InpUsePartialTPbooltrueEnable partial closes
InpTP1_ClosePctdouble0.40Fraction to close at TP1
InpTP2_ClosePctdouble0.30Fraction to close at TP2
InpTP3_ClosePctdouble0.30Fraction to close at TP3
InpMagicNumberint20250301EA magic number
InpSlippageint10Max price slippage in points
InpUseSessionFilterbooltrueEnable session filter
InpSessionStartHourint7Session start hour (broker/server time)
InpSessionStartMinint0Session start minute
InpSessionEndHourint20Session end hour (broker/server time)
InpSessionEndMinint0Session end minute
InpUseFridayCutoffbooltrueNo new entries after Friday cutoff
InpFridayCutoffHourint18Friday cutoff hour (broker/server time)
InpEntryMaxSpreaddouble40Max spread at entry (points) โ€” re-checked before OrderSend
InpUseVolatilityGatebooltrueEnable ATR floor/ceiling gate

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone sapuann/AWRAFX-TRENDLINE-DIVERGENCE-BREAKOUT-EA-MT5 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

EA SMC Engine

by Pauloeduspbr
3 stars

This automated trading robot for MetaTrader 5 implements Smart Money Concepts (SMC) and ICT principles using a hybrid architecture. Trading logic and signal detection are processed within a native C++ DLL, while the MQL5 bridge handles trade execution and data feeding. The system identifies market structure shifts, inc

MT5 Trading robot SMC / ICT / price actionBreakoutTrend following
Updated 5 months ago MIT GitHub repository of EA SMC Engine

Gold Trading Bot Pro

by pollycarp
1 stars

This MetaTrader 5 expert advisor focuses on trading gold and other instruments using a trend-following breakout and retest methodology. It filters market conditions using three moving averages and ATR-based consolidation detection. Entries are triggered by RSI pullbacks and liquidity grab patterns during specific intra

MT5 Trading robot Trend followingBreakoutMean reversion
Updated 1 year ago None stated GitHub repository of Gold Trading Bot Pro

Prop Firm EA Fleet

by cgemise971
20 stars

Prop Firm EA Fleet is a collection of MetaTrader 5 robots designed for passing prop firm evaluations and managing funded accounts. The suite utilizes various strategies including market structure analysis, session range breakouts for London and New York sessions, and high-frequency scalping. It features strict risk man

MT5 Trading robot SMC / ICT / price actionBreakoutScalping High risk
Updated 9 months ago None stated GitHub repository of Prop Firm EA Fleet

Fimathe EA

by yolisses
12 stars

Fimathe EA is a MetaTrader 5 robot designed to automate the Fimathe trading technique. It replaces manual channel drawing by analyzing a user-defined range of historical candles to determine reference channels and neutral zones. The system identifies price partitions and uses the median distance to set entry levels. Fo

MT5 Trading robot BreakoutTrend followingSMC / ICT / price action
Updated 5 years ago None stated GitHub repository of Fimathe EA

Simba Sniper EA

by oriokie
6 stars

This MetaTrader 5 expert advisor focuses on XAUUSD using a multi-timeframe scalping approach based on Smart Money Concepts. It identifies institutional market structures by analyzing H4 trends, H1 supply and demand zones, and M5 entries. The logic incorporates order block detection, Fair Value Gaps (FVG), and liquidity

MT5 Trading robot SMC / ICT / price actionScalpingTrend following High risk
Updated 8 months ago Custom licence GitHub repository of Simba Sniper EA

ICT System EA

by 26730023-PhamPhuNguyenHung
5 stars

This MetaTrader 5 expert advisor automates trading strategies based on Inner Circle Trader (ICT) and Smart Money Concepts (SMC). It utilizes a confluence engine to evaluate market structure, PDA zones, fair value gaps, order blocks, and SMT divergence against correlated symbols like the DXY. Designed specifically for p

MT5 Trading robot SMC / ICT / price actionTrend followingMean reversion
Updated 6 months ago None stated GitHub repository of ICT System 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