Grid Trading MT5 populates the market with a configurable number of buy and sell limit orders between specified high and low boundaries. The expert advisor includes risk management features such as individual stop loss levels in points, take profit settings, and a basket closure mechanism based on a percentage gain. It also features a time-based exit condition that closes positions after a set number of days. The repository lacks a README.
Read from GRID_TRADING.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
Volume
int
1
Contract/lot volume
HIGH_PRICE_SellLim
double
5500.00
HIGH_PRICE_SellLim (the upper price of the last SellLim grid order)
LOW_PRICE_BuyLim
double
4000.00
LOW_PRICE_BuyLim (the lower price of the last BuyLim grid order) for BuyLim
HIGH_PRICE_SL
double
100.00
HIGH_PRICE_SL: SL in points from HIGH_PRICE_SellLim (the upper stop loss price) for SellLim
LOW_PRICE_SL
double
100.00
LOW_PRICE_SL: SL in points from LOW_PRICE_BuyLim (lower stop loss price) for BuyLim
Pending_order_period
int
12
Pending_order_period: limit order setting time in months
Number_of_elements_in_the_grid
int
5
Number of elements in the grid (number of limit orders)
TakeProfit
double
0
TakeProfit from the setting price in order pips
Profit_percentage
double
1
Profit_percentage - grid closure % in profit, works if > "0"
Continued_trading
bool
false
Continued_trading - whether to continue trading after exiting by the grid closure % with profit
Time_to_restrict_trade
int
5
Time_to_restrict_trade - setting the expiration time (in days) for a position with profit
Magic
int
10
Magic Number
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone algocode2022/metatrader5 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.
High Frequency Grid EA is an automated trading robot for MetaTrader 5 that implements a mean-reversion strategy through a grid of pending orders. It places buy and sell stop orders at calculated distances, using dynamic spread monitoring to ensure execution only during favorable conditions. The EA includes a trailing s
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
This expert advisor facilitates arbitrage trading between futures and spot instruments, primarily targeting gold and stock indices. Available for MetaTrader 4 and 5, it monitors the price difference between two related symbols against a moving average to identify trade opportunities. The logic includes a noise-filterin
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
This MetaTrader 5 expert advisor provides an interactive on-chart trading interface for manual execution and automated strategy management. It features dedicated graphical buttons for market entry along with input fields for volume, stop loss, and take profit levels. The repository includes distinct modules for hedging
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