Collection · MT5

Grid Trading Buy And Sell Stop

by thino-dev

The Grid Trading Buy And Sell Stop EA is a MetaTrader 5 expert advisor that places buy and sell stop orders to build grids on the forex market.

High risk

GitHub stars1
Forks0
Last update11 months ago13 Nov 2025
LicenceNone stated

Overview

Grid Trading Buy And Sell Stop enters trades based on grid steps, order distances, and multipliers then manages open positions with trailing stop loss, net profit targets in points or amount, and partial TP. Lot sizing starts at a fixed value and scales with martingale multipliers up to a maximum lot. Optional price zone filters and separate buy sell settings provide controls. The platform is MetaTrader 5.

Details

Author

thino-dev on GitHub

Type

Collection

Platform

MetaTrader 5 (MQL5)

Strategy

Grid, Martingale

Markets

Forex

Timeframes

Any timeframe

Risk Profile

  • Uses martingale lot scaling: losses can grow fast
  • Opens a grid of orders: exposure builds up in a trend

Input Parameters

Read from grid-buy-stop-v2.0.0.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
InpBuyEnablebooltrue[Buy] Enable Trading
InpBuyGridTypeENUM_GRID_TYPEGRID_CLOSE_ALL[Buy] Grid Type
InpBuyGridStepint5000[Buy] Grid Step (points)
InpBuyGridStepMultiplierdouble1.1[Buy] Grid Step Multiplier
InpBuyFollowDistanceint1500[Buy] Follow Distance (points)
InpBuyOrderDistanceint1000[Buy] Order Distance (points)
InpBuySumNetTypeENUM_NET_PROFITNET_PROFIT_POINTS[Buy] Net Profit (Points/Amount)
InpBuyNetProfitPointsint3000[Buy] Net Profit Points (points)
InpBuyProfitTargetAmountdouble10.0[Buy] TP (Amount)
InpBuyStartTrailAbroveAvgPointsint500[Buy] Start Trailing Stop (points)
InpBuyTrailOffsetPointsint300[Buy] Trailing Stop Offset (points)
InpBuyTrailOnlyTightenbooltrue[Buy] Move SL just to get profit
Show all 39 inputs
NameTypeDefaultDescription
InpBuyLotSizedouble0.01[Buy] Start Lot
InpBuyMartingaledouble1.1[Buy] Martingale Multiplier
InpBuyMaxLotsdouble0.05[Buy] Maximum Lot
InpBuyEnablePriceZoneboolfalse[Buy] Enable/Disable Price Zone
InpBuyUpperPricedouble0.0[Buy] Upper Price (0 = No Limit)
InpBuyLowerPricedouble0.0[Buy] Lower Price (0 = No Limit)
InpSellEnableboolfalse[Sell] Enable Trading
InpSellGridTypeENUM_GRID_TYPEGRID_CLOSE_ALL[Sell] Grid Type
InpSellGridStepint5000[Sell] Grid Step (points)
InpSellGridStepMultiplierdouble1.1[Sell] Grid Step Multiplier
InpSellFollowDistanceint1500[Sell] Follow Distance (points)
InpSellOrderDistanceint1000[Sell] Order Distance (points)
InpSellSumNetTypeENUM_NET_PROFITNET_PROFIT_POINTS[Sell] Net Profit (Points/Amount)
InpSellNetProfitPointsint3000[Sell] Net Profit Points (points)
InpSellProfitTargetAmountdouble10.0[Sell] TP (Amount)
InpSellStartTrailAbroveAvgPointsint500[Sell] Start Trailing Stop (points)
InpSellTrailOffsetPointsint300[Sell] Trailing Stop Offset (points)
InpSellTrailOnlyTightenbooltrue[Sell] Move SL just to get profit
InpSellLotSizedouble0.01[Sell] Start Lot
InpSellMartingaledouble1.1[Sell] Martingale Multiplier
InpSellMaxLotsdouble0.05[Sell] Maximum Lot
InpSellEnablePriceZoneboolfalse[Sell] Enable/Disable Price Zone
InpSellUpperPricedouble0.0[Sell] Upper Price (0 = No Limit)
InpSellLowerPricedouble0.0[Sell] Lower Price (0 = No Limit)
InpMagicNumberint2025111201Magic Number
InpSlippageint10Slippage (points)
InpTradeCommentstringGrid_BuySellStopComment

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone thino-dev/FOREX_EA_MQL5_Grid_Trading_V1 from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 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

645 stars

This collection of MetaTrader 5 expert advisors implements various technical strategies using indicators such as Moving Averages, MACD, and the Andean Oscillator. It includes a specific tool for trading based on Commitment of Traders data combined with SuperTrend signals. Most robots in the repository incorporate a gri

MT5 Collection Indicator crossoverScalpingGrid High risk
67 stars

This repository contains a large collection of over 100 expert advisors for the MetaTrader 5 platform, many of which appear to be generated using the Mission Automate tool. The library covers a wide variety of trading methodologies including range breakouts, Ichimoku cloud strategies, Heiken Ashi engulfing patterns, an

MT5 Collection Trend followingBreakoutMartingale High risk
Updated 3 years ago None stated GitHub repository of Konz MQL5 EA Collection

Super Trading Collection

by RoyluxuryTrading
24 stars

This repository provides a collection of MetaTrader 4 and 5 expert advisors, including the modular Super Trading Bot series and an AI-driven trading template. The EAs utilize various technical indicators like Bollinger Bands, Parabolic SAR, and moving averages for trend-following and scalping. Built-in risk management

MT4MT5 Collection Trend followingScalpingAI / machine learning High risk

Expert MT5 Collection

by GeneralTradingSarl
16 stars

This repository is a large collection of over 1,000 expert advisors designed for the MetaTrader 5 platform. It serves as an open-source library featuring various algorithmic trading strategies, including moving average crossovers, RSI levels, Parabolic SAR, and range breakouts. The collection provides robots for trend

MT5 Collection Trend followingBreakoutGrid High risk
Updated 3 weeks ago None stated GitHub repository of Expert MT5 Collection

This collection of expert advisors for MetaTrader 4 and 5 provides various automated strategies based on price action and technical indicators. The primary EA utilizes a moving average crossover system with switchable modes for different market conditions. It features a martingale lot-scaling system for sideways market

MT4MT5 Collection Indicator crossoverMartingaleGrid 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

More collections

Need a Broker for MT5?

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

Compare brokers