Topics: metatrader5, mql5, backtesting, expert-advisor, mql4, metatrader, forex-trading, automated-trading, quantitative-trading, trading-strategies, forward-testing, strategy-tester, monte-carlo, mt4, mt5, trading-bot, mt5-backtest-engine, mt5-bar-replay, mt5-forward-tester
Live strategy backtesting and forward-testing platform for MT5 / MT4 traders. The project lets you replay historical bars, run real-time forward tests, and measure walk-forward performance against streaming market data, all from one desktop console with full equity curve, drawdown, and profit factor analytics.
Bar-by-bar replay engine plus live forward-test mode with equity curve, drawdown stats, and side-by-side strategy comparison.
A strategy that wins on static history can still die on live data.
This project bridges the gap by running:
- Full historical replay
- Real-time forward tests on streaming bars
- Side-by-side comparison of both equity curves
Live Strategy Backtest MT5/MT4 turns your trading idea into a measurable, statistically honest workflow.
| Module | Description |
|---|---|
| Bar Replay Engine | Steps through history at variable speed |
| Forward Test | Runs strategy on live broker feed |
| Order Simulator | Slippage & spread aware execution |
| Equity Tracker | Real-time balance & drawdown |
| Stats Engine | Sharpe, profit factor, expectancy |
| Trade Log | Every entry, exit, and reason |
| Feature | Description |
|---|---|
| Replay Speed Control | 1x to 500x bar speed |
| Equity Curve | Live drawing & zoom |
| Drawdown Heatmap | Max DD per session highlighted |
| Strategy Slots | Load multiple strategies in parallel |
| MT4 / MT5 Support | Platform selection system |
| Symbol & Timeframe | Any pair, M1 to D1 |
| Spread Simulator | Fixed / variable / realistic |
| Trade Table | All trades with P&L and R |
| Stats Panel | Win rate, PF, Sharpe, expectancy |
| Export | CSV / JSON results |
- Deterministic replay, identical run = identical result
- Forward and replay can run side by side
- Pause / resume any test mid-run
- Crash-safe state save per session
Requirements:
- Windows 10 / 11
- .NET 8+
- Visual Studio 2022
git clone https://github.com/your-username/live-strategy-backtest.gitOpen solution → Press F5
- Launch app
- Select MT4 / MT5
- Enter login
- Click CONNECT
- Load strategy & data range
- Pick replay speed
- Click START TEST
- Read equity & stats live
EQUITY ┌─/\__/\─┐
│ └─/\
DD ────▼────▼──
TRADES + - + + -
- Green = trade closed in profit
- Red = trade closed in loss
- Blue line = equity curve
- Red shading = drawdown
- Bar replay
- Forward test
- Stats engine
- Real MT5 history bridge
- Monte Carlo runs
- Walk-forward optimizer
- Cloud test queue
1. Fork
2. git checkout -b feature/new-feature
3. git commit -m "Add feature"
4. git push
5. Open PR
MIT
Live Strategy Backtest MT5/MT4 · v1.0

