A complete trading automation framework using MetaTrader 5, LSTM Neural Networks, and Python. The bot detects engulfing candlestick patterns, combines volume and pivot-based signals, and trades GBPUSD using a risk-managed strategy with trailing stop-loss, partial take-profit, and live execution support.
Last updated Jul 9, 2026
15
Stars
4
Forks
0
Issues
0
Stars/day
Attention Score
57
Topics
Language breakdown
Python 100.0%
โธ Files
click to expand
README
MT5 LSTM Trading Bot (GBPUSD)
A complete trading automation framework using MetaTrader 5, LSTM Neural Networks, and Python. The bot detects engulfing candlestick patterns, combines volume and pivot-based signals, and trades GBPUSD using a risk-managed strategy with trailing stop-loss, partial take-profit, and live execution support.
Features
- ๐ Real-time data feed from MetaTrader 5
- ๐ค LSTM-based machine learning model for trade predictions
- ๐ง Feature engineering: Engulfing patterns, volume multipliers, pivot levels
- ๐งช Backtesting engine with R/R, trailing SL, partial TP
- ๐ Live trading with MT5 execution API
- ๐ Equity curve and training visualization
Requirements
- MetaTrader 5 (installed and connected to a broker)
- Python 3.8+
- Required Python packages:
pip install -r requirements.txt
requirements.txt example:
MetaTrader5 pandas numpy scikit-learn matplotlib tensorflow pytz
How to Run
- Ensure MetaTrader 5 is installed and logged in.
- Launch a Python environment (like Jupyter or terminal).
- Run the script:
python trading_bot.py
File Structure
trading_bot.pyโ Main file containing:
Notes
- Live trading mode can be toggled with
LIVE_TRADING = True - You must allow DLL imports and automated trading in MT5 settings.
Contact
For help or customization, reach out on Telegram: @NAKBlockDev
๐ More in this category