This MetaTrader 5 expert advisor utilizes deep learning models, specifically Long Short-Term Memory or Transformer architectures, to predict price movements several bars ahead.
ALFA Transformer AI operates by communicating via HTTP with a local Python daemon that processes machine learning inference. The system includes an advanced Kelly Criterion position sizing engine, an adaptive scalping strategy, and time-based trading filters. It requires external training of models using provided Python scripts. Users can choose between regression-only or combined trading modes with ATR-based risk management and volatility-adjusted stop losses.
Read from SAM (1).mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
DaemonHost
string
127.0.0.1
Daemon server host
DaemonPort
int
8888
Daemon server port
HttpTimeoutMs
int
15000
HTTP request timeout (ms)
MaxRetryAttempts
int
3
Max retry attempts for failed requests
RetryDelayMs
int
1000
Delay between retries (ms)
EnableHttpLogging
bool
true
Enable detailed HTTP logging
TestDaemonOnStart
bool
false
Test daemon communication on startup
EnableKellyCriterion
bool
true
Enable Kelly Criterion position sizing
MaxKellyFraction
double
0.25
Maximum Kelly fraction (25% recommended)
MinKellyFraction
double
0.01
Minimum Kelly fraction (1% minimum)
KellyLookbackTrades
int
30
Number of recent trades for Kelly calculation
KellyMultiplier
double
0.5
Kelly fraction multiplier (0.5 = Half-Kelly)
Show all 40 inputs
Name
Type
Default
Description
UseConfidenceScaling
bool
true
Scale Kelly by prediction confidence
BaseRiskWhenNoHistory
double
2.0
Risk % when insufficient trade history
EnableKellySmoothing
bool
true
Smooth Kelly changes to prevent whipsawing
KellySmoothingFactor
double
0.3
Smoothing factor (0.1-0.5 recommended)
EnableTradingHours
bool
false
Enable/disable trading hours filter
TradingStartHour
int
8
Start trading hour (0-23)
TradingEndHour
int
18
End trading hour (0-23)
TradingMonday
bool
true
Trade on Monday
TradingTuesday
bool
true
Trade on Tuesday
TradingWednesday
bool
true
Trade on Wednesday
TradingThursday
bool
true
Trade on Thursday
TradingFriday
bool
true
Trade on Friday
TradingSaturday
bool
false
Trade on Saturday
TradingSunday
bool
true
Trade on Sunday
AvoidNewsHours
bool
false
Avoid major news hours
NewsAvoidanceHours
string
14:30-15:30
Hours to avoid (format: HH:MM-HH:MM)
ClosePositionsOutsideHours
bool
false
Close positions when outside trading hours
EnableScalpingStrategy
bool
true
Enable/disable scalping
BaseScalpingPips
double
10.0
Base pip threshold for scalping
ScalpingTimeoutBars
int
3
Bars to hold scalping position
ScalpingRiskPercent
double
1
Risk % for scalping (separate from main)
AdaptiveScalpingThreshold
bool
true
Make pip threshold adaptive
MinScalpingAccuracy
double
0
Minimum accuracy required for scalping
ScalpingOverridesMain
bool
false
If true, scalping replaces main strategy
AdaptiveLearningMode
ENUM_ADAPTIVE_MODE
ADAPTIVE_CONSERVATIVE
EnableDynamicConfidence
bool
true
EnableAdaptivePositionSizing
bool
true
EnableStepWeighting
bool
true
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone syngyn/LSTM-Future-5-bar-prediction-MQL5 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.
This Expert Advisor for MetaTrader 5 is specifically designed for XAUUSD trading on the M1 timeframe. It utilizes a hybrid strategy combining classic technical indicators like RSI, Moving Averages, and ATR with an OpenAI API integration for signal validation. The robot features an on-chart dashboard for telemetry and i
This collection of MetaTrader 5 expert advisors integrates external machine learning models via a local HTTP daemon for trade execution. The core system, GGTH-SR, utilizes sophisticated position sizing based on the Kelly Criterion with confidence-based scaling and smoothing. It includes an adaptive scalping module with
This expert advisor for MetaTrader 5 performs scalping by identifying price levels based on a configurable lookback period. It incorporates a machine learning signal filter, requiring a separate Python environment to classify high-probability trade setups using historical market data. The robot manages entries within s
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
This MetaTrader 5 expert advisor acts as a bridge between the trading terminal and an external Python-based AI server. It extracts market data and technical indicators—including EMA, RSI, ATR, and ADX across multiple timeframes—to request trade signals via ZeroMQ, TCP, or file-based communication. The EA manages trade
Conquest EA is a self-adjusting expert advisor for MetaTrader 5 that utilizes Smart Money Concepts such as Fair Value Gaps and Break of Structure for entries. It features a built-in learning module that evaluates its own trade outcomes to adjust strategy weighting and confidence in real-time. Risk management includes a