Trading robot · MT5

Adaptive DDQN MT5

by chyr-rpg

This MetaTrader 5 expert advisor is a research-oriented reinforcement learning system implemented natively in MQL5.

High risk

GitHub stars1
Forks0
Last update2 days ago20 Sep 2026
LicenceNone stated

Overview

Adaptive DDQN MT5 utilizes a Deep Q-Network to make trading decisions based on market states derived from technical indicators, volatility, and supply-demand zones. The system manages trades using a grid-based basket approach with lot scaling via a multiplier. Risk controls include take profit, optional trailing stops, and equity-based guards, though it defaults to no fixed stop loss per trade. It features experience replay and persistent memory to adapt to market conditions across multiple symbols.

Details

Author

chyr-rpg on GitHub

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

AI / machine learning, Grid, Martingale

Markets

Forex, Gold, Indices

Timeframes

M1-M5, M15-H1

Risk profile

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

Topics

deep-qmachine-learningmachine-learning-algorithmsmetatrader5mql5qtablemodelquantitative-financereinforcement-learningreinforcement-learning-algorithmsautomatic-trader

Input parameters

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

NameTypeDefaultDescription
MaxZonesTrackedint50
SymbolsSettingsstring==== Symbols / Universe ====
SymbolModeENUM_SYMBOL_MODESYM_CURRENT
SymbolsListstringEURUSD,GBPUSD,XAUUSD,US30
BaseMagicint220111
TFSettingsstring==== Timeframe settings ====
BaseTFENUM_TIMEFRAMESPERIOD_M5
Generalstring==== General settings ====
Lotsdouble0.01
LotExponentdouble1.4
MaxTradesint10
TakeProfitint100POINTS
Show all 40 inputs
NameTypeDefaultDescription
StopLossint0POINTS
Slippageint30
SymbolSettingsstring==== Q/DQN settings ====
QTablePrefixstring
DynamicSettingsstring==== Dynamic grid / channel settings ====
UseDynamicPipsbooltrue
DefaultPipsint120POINTS
Depthint24
PipsFactordouble3.0
IndicatorSettingsstring==== Indicator settings ====
RSI_Periodint14
RSI_Minimumdouble30.0
RSI_Maximumdouble70.0
UseCCIboolfalse
CCI_Periodint55
CCI_Levelint500
ExitSettingsstring==== Exit & risk settings ====
UseTrailingStopboolfalse
TrailStartint100
TrailStopint100
UseEquityStopboolfalse
EquityRiskPercentdouble20.0
BudgetSettingsstring==== Virtual equity budget ====
EquityBudgetdouble1000.0
CorrelationSettingsstring==== Correlation filter settings ====
UseCorrelationbooltrue
MinCorrelationdouble0.7
CorrelationPeriodint50

How to install it

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

1 stars

This machine learning expert advisor for MetaTrader 5 utilizes ensemble and deep learning models to analyze market patterns. It offers a versatile multi-strategy approach, allowing users to toggle between trend-following, scalping, and grid-hedging behaviors. Risk controls are comprehensive, featuring fixed percentage

MT5 Trading robot AI / machine learningMulti-strategyScalping High risk

AI Enhanced HFT

by Marco210210
20 stars

This MetaTrader 5 expert advisor combines technical indicators with machine learning forecasts to trade the Forex market. It uses a trend-following approach based on Exponential Moving Average crossovers, filtered by the Average Directional Index and volume confirmations. A unique feature is its integration with extern

MT5 Trading robot Trend followingIndicator crossoverAI / machine learning High risk
Updated 1 year ago None stated GitHub repository of AI Enhanced HFT

RSI Martingale EA

by peefpee
10 stars

This Expert Advisor for MetaTrader 5 implements a martingale trading strategy triggered by the Relative Strength Index (RSI). It opens an initial position when RSI reaches overbought or oversold thresholds. If price continues to move against the initial trade, the EA layers additional orders at set point intervals, mul

MT5 Trading robot MartingaleMean reversionGrid High risk

Smart Grid Martingale EA

by chenhengyi53-design
8 stars

This MetaTrader 5 expert advisor executes a grid trading strategy enhanced with martingale lot scaling. The system identifies market direction through multi-timeframe analysis using Exponential Moving Averages and the Average Directional Index. It features dynamic grid spacing that adjusts based on market volatility an

MT5 Trading robot GridMartingaleTrend following High risk
Updated 7 months ago None stated GitHub repository of Smart Grid Martingale EA
7 stars

This MetaTrader 5 expert advisor executes a mean reversion strategy based on price deviation from a Simple Moving Average. It enters short positions when prices rise above the average and long positions when prices fall below. The algorithm utilizes an aggressive grid-based recovery system where both the entry distance

MT5 Trading robot Mean reversionMartingaleGrid High risk

Currency Strength EA

by drdz9876
6 stars

This MetaTrader 5 expert advisor utilizes a multicurrency strength system to identify trading opportunities by comparing relative currency values. It calculates strength based on a configurable lookback period, typically using H4 data, and includes triangular weighting and smoothing options. The robot manages exits usi

MT5 Trading robot MartingaleMulti-strategyGrid High risk
Updated 4 years ago GPL-3.0 GitHub repository of Currency Strength EA

More trading robots

Need a broker for MT5?

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

Compare brokers