Bi-Directional Hedging Grid simultaneously maintains buy and sell baskets, opening new positions at fixed or ATR-calculated intervals when the market moves against existing trades. The EA employs a soft martingale lot multiplier to scale positions and exits through either individual take profit targets or a collective basket profit in currency. It includes prop-firm oriented risk controls such as equity-based daily drawdown limits, spread filters, rollover pauses, and automated weekend closures.
Read from BiDirectionalHedgingGrid.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
MagicNumberBuy
int
1000
Magic Number koszyka BUY
MagicNumberSell
int
2000
Magic Number koszyka SELL
BaseLot
double
0.01
Lot pozycji startowej
GridMode
ENUM_GRID_MODE
FIXED_POINTS
Tryb odleglosci siatki
FixedGridPoints
int
100
Krok siatki w punktach (gdy FIXED_POINTS)
AtrPeriod
int
14
Okres ATR (gdy ATR_MODE)
AtrMultiplier
double
1.5
Mnoznik ATR (gdy ATR_MODE)
LotMultiplier
double
1.3
Soft Martingale: lot = ostatni lot * mnoznik
BaseTakeProfitPoints
int
200
TP pojedynczej bazy w punktach (_Point)
BasketProfitTarget_USD
double
0.5
Cel zysku KOSZYKA (od 2. nogi) w walucie depozytu
UseDailyDrawdown
bool
true
Wlacz dzienny limit drawdown
MaxDailyDrawdownPercent
double
4.5
Max DD % od equity z 00:00 czasu serwera
Show all 18 inputs
Name
Type
Default
Description
MaxSpreadPoints
int
30
Max spread w punktach (_Point)
UseMidnightPause
bool
true
Pauza na rollover (brak NOWYCH zlecen)
PauseStartTime
string
23:55
Poczatek pauzy (HH:MM)
PauseEndTime
string
00:15
Koniec pauzy (HH:MM)
CloseBeforeWeekend
bool
true
Zamknij wszystko w piatek i uspij do poniedzialku
FridayCloseTime
string
22:00
Godzina zamkniecia w piatek (HH:MM)
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone Yoshinarium/BiDirectionalHedgingGrid 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.
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.
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
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.
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
This MetaTrader 5 expert advisor functions as a grid-based recovery system that can operate independently or manage trades from external EAs via magic number filtering. It initiates entries using Bollinger Bands and RSI indicators, then manages drawdown through a recovery grid matrix. The system employs dynamic ATR-bas
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