⚠️ DISCLAIMER: This software is for educational purposes only. Forex trading involves substantial risk of loss. Always start with paper trading. Never risk money you cannot afford to lose. Past performance does not guarantee future results.An advanced, autonomous Forex trading bot combining 6 professional strategies inspired by the world's best traders, with a full web dashboard, risk management engine, and support for MetaTrader 5 and OANDA.
The bot combines signals from 6 strategies using weighted consensus voting. At least 2 strategies must agree before a trade is entered.
Strategy Inspired By Weight Description ICT Smart Money Concepts Inner Circle Trader 3.0x Order Blocks, FVGs, BOS/CHoCH, Liquidity Sweeps EMA Trend Following Paul Tudor Jones, Stanley Druckenmiller 2.5x EMA 8/21/50/200 crossovers + RSI filter S/R Breakout George Soros 2.5x Key level breaks with volume confirmation SuperTrend ML xPOURY4/ML-SuperTrend-MT5 2.0x ATR-based SuperTrend with ML filtering MACD Divergence Professional standard 1.5x MACD signal line cross + divergence Bollinger Bands Mean Reversion Professional standard 1.5x BB + RSI oversold/overbought
- Fully Autonomous - Runs 24/7, analyzing 8 currency pairs automatically
- Multi-Strategy Consensus - Only trades when 2+ strategies agree (reduces false signals)
- Professional Risk Management - Kelly Criterion sizing, trailing stops, drawdown limits
- Multi-Timeframe Analysis - H4 trend filter + H1 signal generation
- Web Dashboard - Beautiful real-time UI with P&L charts and trade history
- WebSocket Updates - Live data without page refresh
- Paper Trading Mode - Test risk-free with virtual $10,000
- Broker Support - MetaTrader 5 and OANDA API
- Inspired By Top Repos:
- joshyattridge/smart-money-concepts - ICT indicators
- xPOURY4/ML-SuperTrend-MT5 - ML SuperTrend
- Lumiwealth/lumibot - Bot architecture
- freqtrade/freqtrade - Strategy framework
QuantConnect/Lean - Algorithmic trading engine
EURUSDGBPUSDUSDJPYAUDUSDUSDCADNZDUSDUSDCHFXAUUSD git clone https://github.com/ausjones84/forex-trading-bot.git cd forex-trading-bot python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txtcp .env.example .env # Edit .env with your settings# .env: BROKER_MODE=paper python app.pyNavigate to
http://localhost:5000in your browser.MetaTrader 5:
BROKER_MODE=mt5 MT5_LOGIN=your_account_number MT5_PASSWORD=your_password MT5_SERVER=YourBroker-DemoOANDA (Demo):
BROKER_MODE=oanda OANDA_API_KEY=your_api_key OANDA_ACCOUNT_ID=your_account_id OANDA_ENVIRONMENT=practiceforex-trading-bot/ ├── app.py # Flask web server + REST API ├── requirements.txt # Python dependencies ├── .env.example # Configuration template ├── bot/ │ ├── strategies.py # All 6 trading strategies │ ├── risk_manager.py # Risk management engine │ └── bot_engine.py # Main trading loop + broker connectors └── templates/ └── index.html # Web dashboard UIThe bot enforces strict risk rules that top professional traders use:
- Max 1-2% risk per trade (Bill Lipschutz rule)
- Daily loss limit (5% default) - bot stops if hit
- Max drawdown limit (15% default) - bot stops if hit
- Minimum 2:1 R:R ratio before entering any trade
- ATR-based trailing stops - automatically move to lock in profits
- Max 5 simultaneous open trades
- Position sizing via Kelly Criterion + fixed fractional method
H4 trend filter - never trade against the higher timeframe trend
The highest-weighted strategy. Identifies where institutional (smart money) traders are positioned by detecting:
- Fair Value Gaps (FVG) - Price imbalances that often get filled
- Order Blocks (OB) - Areas where large institutional orders cluster
- Break of Structure (BOS) - Trend continuation signals
Change of Character (CHoCH) - Early trend reversal signals
Classic trend following used by momentum traders:
- EMA 8/21 crossover for entry trigger
- EMA 50/200 for trend direction filter
RSI 50 zone for momentum confirmation
| Trader | Strategy | Key Principle |
|--------|----------|---------------|
| George Soros | Reflexivity + Macro | Trade when market narratives are wrong; bet big | | Bill Lipschutz | Risk/Reward Asymmetry | Maximize R:R; cut losers instantly | | Stanley Druckenmiller | Momentum + Macro | Concentrate on best ideas; ride trends hard | | Paul Tudor Jones | Breakout + Elliott Wave | Trade breakouts; strict risk management | | ICT (Michael Huddleston) | Smart Money Concepts | Follow institutional order flow |
- Real-time P&L chart with cumulative equity curve
- Live open positions with entry price, SL, and TP
- Trade history with per-trade P&L
- Strategy breakdown bar chart
- Risk settings - adjustable in real-time without restarting
- Win rate, profit factor, best/worst trade stats
WebSocket for live updates every 5 seconds
- Always start with paper trading until you understand the bot's behavior
- Use a demo account when connecting to a real broker for the first time
- Monitor the bot - do not leave it running completely unattended at first
- Forex is risky - even the best strategies can have losing periods
This bot does NOT guarantee profits - it implements strategies that have historically worked, but past performance doesn't predict future results
MIT License - see LICENSE for details.
Built with ❤️ using Python, Flask, and the best open-source trading libraries.
ausjones84/forex-trading-bot
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|