Trading robot · MT4

Gann Fan Bot

by AbasNiknam

This MetaTrader 4 expert advisor automates trading based on Gann Fan theory by identifying trend angles from recent swing highs and lows.

GitHub stars1
Forks0
Last update1 year ago8 Oct 2025
LicenceNone stated

Overview

Gann Fan Bot enters the market using buy and sell stop orders placed at specific distances from detected Gann lines. The robot includes risk management features such as fixed stop loss, take profit levels, and a daily position closure option. It supports multiple positions with predefined tiered lot sizes and limits the total number of open trades in each direction to control exposure.

Details

Author

AbasNiknam on GitHub

Type

Trading robot

Markets

Any symbol

Timeframes

M15-H1, H4 and above

Risk Profile

  • Holds opposite positions at once

EA Files

Input Parameters

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

NameTypeDefaultDescription
intervalInputint4Interval in hours
StopOrderDistancedouble5Distance to Place Buy/Sell Stop Order
StopLossdouble100Distance to Place Stop Loss
TPdouble200Distance to Place TP
Lots1double0.01Lots1
Lots2double0.02Lots2
Lots3double0.03Lots3
Lots4double0.04Lots4
DistanceToCheckdouble135Distance to Check and Send New Order
MaxNumOfBuyint4Max allowed Num of Buy Position
MaxNumOfSellint4Max allowed Num of Sell Position
OnTickModeboolfalseOnTick or OnBar?
Show all 13 inputs
NameTypeDefaultDescription
CloseAtEndbooltrueClose Positions at End of Day

How to Install It

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

The Gold Reaper

by naming1086
1 stars

The Gold Reaper is a multi-strategy expert advisor for MetaTrader 4 and 5. It trades gold pairs using breakout and reversal entries based on fractals and ATR. Trades enter when spread and frequency conditions are met and exit via trailing stops or time-based rules. The EA includes NFP filters to pause during economic e

MT4MT5 Trading robot BreakoutTrend followingScalping High risk
Updated 6 weeks ago None stated GitHub repository of The Gold Reaper

Nyao Scalper

by elrizwiraswara
214 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 2 weeks ago BSD-3-Clause GitHub repository of Nyao Scalper

Prem Gold Advisor

by Premkumar238
13 stars

Prem Gold Advisor is an automated MetaTrader 5 expert advisor specialized for XAUUSD (Gold) trading on the five-minute timeframe. It initiates trades using breakout levels placed at specific distances from the candle open. The strategy features a progressive scale-in mechanism, adding new orders as the price hits succe

MT5 Trading robot BreakoutTrend followingMartingale High risk
Updated 2 months ago None stated GitHub repository of Prem Gold Advisor

EA XAUUSD Premium

by diditgravatar
4 stars

This MetaTrader 5 expert advisor is designed for gold trading, utilizing a multi-timeframe strategy across the M15, H1, and H4 charts. It integrates technical indicators including ADX, RSI, and Moving Averages to identify trend-following and breakout opportunities. Risk controls include dynamic lot sizing based on acco

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of EA XAUUSD Premium

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 11 months ago None stated GitHub repository of Experienced FX Trader

Phantom Edge

by tHeStRyNg
1 stars

Phantom Edge is a MetaTrader 5 expert advisor primarily designed for trading BTCUSD. It identifies entries using a combination of technical indicators, including RSI, MACD, and SMA, while validating setups through multi-timeframe analysis of M15 liquidity sweeps and M30 trend breaks. The EA features comprehensive trade

MT5 Trading robot Trend followingBreakoutHedging
Updated 1 year ago None stated GitHub repository of Phantom Edge

More trend-following EAs

Related on ForexR

Need a Broker for MT4?

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

Compare MT4 brokers