Collection · MT4 · MT5

Grid Bot

by tbradlo

This MetaTrader EA opens and manages a grid of buy positions every 50 points, setting a fixed take profit of 75 points per trade.

High risk

GitHub stars1
Forks1
Last update5 days ago6 Oct 2026
LicenceMIT

Overview

Grid Bot can hold up to 10 buy positions and 5 sell positions of 0.02 lots each, closing the worst sell orders when the sell buffer reaches 5 to free capital. Stochastic oscillator parameters (K=14, overbought 79, oversold 20) guide entry timing, with trading starting at 10:11 AM. The robot uses hedging to hold opposing positions and sorts buys by open price. Fixed lot sizing avoids martingale scaling; notable limits include maximum position counts and no dynamic lot adjustment.

Details

Author

tbradlo on GitHub

Type

Collection

Platform

MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5)

Strategy

Grid, Indicator crossover, Hedging

Markets

Indices

Timeframes

Any timeframe

Risk Profile

  • Opens a grid of orders: exposure builds up in a trend
  • Holds opposite positions at once

Input Parameters

Read from BUY GRID v5 avg.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
expertNamestringGRID buy
expertIdint8
buyPositionsSizedouble0.1how big positions to open
nextBuyPositionByPointsdouble50
maxBufferint0keep X positions sell buffer to have sth to sell in case of rapid grow
takeProfitPointsdouble75
maxBuyPositionsint10
maxBuyPricedouble100.0
sellPositionSizedouble0.02SELL position size
sellPositionsToOpenint4
nextSellPositionByPointsdouble50
sellPosToCloseint5Xth worst to close
Show all 16 inputs
NameTypeDefaultDescription
maxSellPositionsint5
stoch_K_Periodint14
stochTopint79
stochBtmint20

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone tbradlo/Metatrader from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts or MQL5/Experts.
  3. 3Copy the filesCopy the .mq4 / .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  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

33 stars

This repository provides a collection of MetaTrader 4 expert advisors, notably featuring a grid-based trading system. The mGRID EA executes trades by placing multiple pending buy and sell stop orders at fixed pip increments, attempting to capture price movement in either direction. It offers risk controls through confi

MT4 Collection GridIndicator crossoverMulti-strategy High risk
12 stars

This MetaTrader 4 repository contains a collection of expert advisors, primarily featuring the Chaos Theory EA. This robot combines several trading methodologies including Bill Williams' Chaos Theory, Trading Made Simple, and THV3 to trade multiple currency pairs simultaneously. It utilizes technical filters such as Su

MT4 Collection Multi-strategyTrend followingIndicator crossover High risk

This repository is a substantial collection of nearly five hundred Expert Advisors for the MetaTrader 5 platform. The library includes various automated strategies such as divergence detection using RSI and MACD, moving average crossovers, and zone recovery systems. It features a mix of trading robots, indicator-based

MT5 Collection Indicator crossoverMean reversionMartingale High risk
4 stars

This repository is a collection of MetaTrader 4 expert advisors and indicators focused on aggressive trading strategies. The primary expert advisor uses a grid-based approach with martingale lot scaling to manage positions. It features multiple entry logics, including Bollinger Bands, Exponential Moving Averages, and m

MT4 Collection MartingaleGridIndicator crossover High risk

Mql Projects Collection

by PranavSonar
3 stars

This repository features a collection of MetaTrader 4 expert advisors, primarily focused on a multi-strategy system named Complete Robot. The main EA utilizes a combination of technical indicators including Moving Averages, MACD, Bollinger Bands, and Stochastic oscillators for market entry. It employs a grid-based appr

MT4 Collection GridMartingaleIndicator crossover High risk
Updated 8 years ago None stated GitHub repository of Mql Projects Collection

MQ4 Master Collection

by hairibaba
3 stars

This repository provides a collection of MetaTrader 4 expert advisors and utility tools. It includes diverse trading strategies ranging from M1 scalping and Heiken Ashi trend following to swing-based approaches. The codebase features a robust trade management framework with classes for order execution, error handling,

MT4 Collection Trend followingScalpingIndicator crossover High risk Archived
Updated 7 years ago None stated GitHub repository of MQ4 Master Collection

More collections

Need a Broker for MT4/MT5?

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

Compare brokers