GridHedge EA opens positions based on manual direction selection or an optional candlestick pattern filter. The EA expands grid orders using fixed point offsets and increases lot sizes incrementally after unsuccessful cycles. Risk controls include monetary profit targets and maximum loss limits defined in account currency, a maximum grid trade cap, max spread controls, and a time filter. The system requires an MT5 account with hedging enabled and includes an on-chart panel for live statistics.
Dynamic grid placement and opposite-side hedging
Progressive lot scaling after failed trade cycles
Optional candlestick pattern filter for trade entries
Account currency profit target and max loss limits
Configurable time and max spread execution filters
Read from GridHedge_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpStartLot
double
0.01
Starting Lot Size
InpGridPips
int
100
Grid Offset (points)
InpMaxGridTrades
int
5
Trades before cycle marked failed
InpTakeProfit
double
10.0
Take Profit (account currency, 0=disabled)
InpMaxLoss
double
50.0
Max Loss (account currency, 0=disabled)
InpMagicNumber
int
777777
Magic Number
InpInitDir
ENUM_INIT_DIR
DIR_AUTO
Initial Direction (Auto=candle/random)
InpSlippage
int
10
Max Slippage (points)
InpLotIncrement
double
0.01
Lot Increment After Failed Cycle
InpMaxLotSize
double
0.0
Max Lot Size (0=no limit)
InpUseCandleFilter
bool
false
Enable Candlestick Pattern Filter
InpCandleTF
ENUM_TIMEFRAMES
PERIOD_CURRENT
Candlestick Timeframe
Show all 20 inputs
Name
Type
Default
Description
InpUseTimeFilter
bool
false
Enable Time Filter
InpTimeStart
string
22:00
Stop New Trades Start Time
InpTimeEnd
string
01:00
Stop New Trades End Time
InpMaxSpread
double
0.0
Max Spread (points, 0=disabled)
InpShowPanel
bool
true
Show Info Panel
InpPanelColor
color
clrMidnightBlue
Panel Background Color
InpTextColor
color
clrWhite
Panel Text Color
InpFontSize
int
9
Panel Font Size
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone MuhammadHassanC/GridHedge-EA- from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
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
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
AutoTrade EA is a scalping robot for MetaTrader 4 and 5 that utilizes a multi-indicator signal scoring system based on Exponential Moving Average crossovers and RSI levels. It employs an aggressive trade management strategy featuring a dynamic grid and a stepped martingale lot scaling system where position sizes increa
Grid Hedge Combine is a MetaTrader 5 expert advisor designed to automate market entries using a mixture of grid and hedging techniques. It opens initial trades and layers subsequent orders at predefined pip intervals when the price moves against the position. The EA features lot size scaling, allowing for aggressive or
This Expert Advisor for MetaTrader 5 focuses on gold trading through a combination of mean-reversion signals and a grid management system. It uses multi-timeframe filters, including exponential moving averages and ADX on the H1 timeframe, to identify trend direction while executing entries on M15 based on RSI and Bolli
Mr X Grid Hedge is a MetaTrader 5 expert advisor specifically designed for XAUUSD trading. It utilizes a grid strategy with entry signals confirmed by a combination of EMA crossovers, RSI bounds, and ATR volatility filters. The system manages risk through automated hedging triggered by drawdown or specific grid depth.