Trading robot · MT5

Dejavu EA

by MarxMad

Dejavu EA is a grid trading robot for MetaTrader 5 that automates trade entry using a system of pending orders.

High risk

GitHub stars1
Forks0
Last update9 months ago3 Feb 2026
LicenceNone stated

Overview

Dejavu EA supports buy and sell stops and limits, organized in configurable increments. The strategy includes a dynamic take profit mechanism relative to grid spacing, trailing stops, and ATR-calculated stop losses. Risk management is centralized around equity-based lot sizing and a global drawdown percentage limit. A specialized graphical interface allows users to toggle order types and manage grid replenishment directly on the chart.

Details

Author

MarxMad on GitHub

Type

Trading robot

Strategy

Grid, Hedging

Markets

Any symbol

Timeframes

Any timeframe

Risk Profile

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

EA Files

Input Parameters

Read from Dejavu.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
GestionRiesgosstringGestion de Riesgos
stopLossdouble9000Stop Loss en puntos
takeProfitdouble2000Take Profit en puntos
maxDrawdownPercentdouble20Máximo drawdown permitido en porcentaje
riskPerTradedouble2Riesgo por operación en porcentaje
dynamicSLMultiplierdouble1.5Multiplicador para SL dinámico (ATR)
atrPeriodint14Periodo para el cálculo del ATR
ConfigTradingstringConfiguracion de Trading
tpinversodouble2000Take Profit para órdenes inversas (en puntos)
slinversodouble9000Stop Loss para órdenes inversas (en puntos)
incrementoint15Incremento entre órdenes en la cuadrícula (en puntos)
cantidadDeOperacionesint50Cantidad máxima de operaciones por dirección
Show all 40 inputs
NameTypeDefaultDescription
cantidadDeGananciadouble20000Objetivo de ganancia total (en puntos)
reiniciarProgramabooltrueReiniciar después de alcanzar objetivo de ganancia
tBuyStopboolfalseActivar órdenes BuyStop
tBuyLimitbooltrueActivar órdenes BuyLimit
tSellStopboolfalseActivar órdenes SellStop
tSellLimitbooltrueActivar órdenes SellLimit
ConfigReposicionstringConfiguracion de Reposicion
reponerLimitsbooltrueReponer órdenes Limit automáticamente
reponerStopsbooltrueReponer órdenes Stop automáticamente
ConfigGruposstringConfiguracion de Grupos
ordenesPorGrupoint15Número de órdenes por grupo antes de aumentar incremento
incrementoPorGrupoint5Incremento adicional por cada grupo (en puntos)
ConfigTPDinamicostringTake Profit Dinamico
usarTPDinamicobooltrueActivar Take Profit dinámico basado en incremento
factorTPDinamicodouble0.6Factor multiplicador (0.6 = 60% del incremento)
minTPdouble100TP mínimo permitido (en puntos)
maxTPdouble5000TP máximo permitido (en puntos)
ConfigTrailingstringTrailing Stop
activarTrailingStopbooltrueActivar sistema de Trailing Stop
trailingStopPuntosdouble500Distancia del SL al precio actual (en puntos)
trailingStepdouble100Paso mínimo para mover el SL (en puntos)
ConfigLotesstringConfiguracion de Lotes
lot100double.01Lote para equity < 1000
lot1000double.01Lote para equity 1000-2000
lot2000double.01Lote para equity 2000-3000
lot3000double.01Lote para equity 3000-4000
lot4000double.01Lote para equity 4000-5000
lot5000double.01Lote para equity 5000-6000

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone MarxMad/Algorithm_Trading_MT5_Dejavu 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

Prem Gold Advisor

by Premkumar238
13 stars

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

MT5 Trading robot BreakoutTrend followingMartingale High risk
Updated 2 months ago None stated GitHub repository of Prem Gold Advisor
8 stars

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

MT5 Trading robot GridMean reversionScalping High risk

Grid Trading MT5

by algocode2022
6 stars

This grid trading robot for MetaTrader 5 automates the placement of multiple limit orders within a user-defined price range. It 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

MT5 Trading robot GridHedging High risk
Updated 3 years ago GPL-3.0 GitHub repository of Grid Trading MT5

EA XAUUSD Premium

by diditgravatar
4 stars

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

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of EA XAUUSD Premium

STO Martin

by crq644
3 stars

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

MT5 Trading robot MartingaleGridTrend following High risk
Updated 3 years ago None stated GitHub repository of STO Martin
3 stars

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

MT4MT5 Trading robot ArbitrageMean reversionGrid High risk
Updated 4 years ago None stated GitHub repository of Gold Futures Spot Arbitrage

More grid EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers