MetaTrader Import Guide
AlgoChef accepts trade history exports from MetaTrader 4 (MT4) and MetaTrader 5 (MT5). The export process differs slightly between versions.
Exporting from MetaTrader 4 (MT4)
- Open MetaTrader 4
- Go to View → Terminal (or press Ctrl+T)
- Click the Account History tab
- Right-click anywhere in the trade list
- Select Save as Report → choose Detailed Report
- Save as HTML, then open in Excel and export as CSV
Info
MT4 does not export directly to CSV. The recommended workflow is: export as HTML → open in Excel → save as CSV. Alternatively, use the Save as Report (CSV) option if available in your broker's MT4 build.
Exporting from MetaTrader 5 (MT5)
- Open MetaTrader 5
- Go to View → Terminal (or press Ctrl+T)
- Click the History tab
- Right-click anywhere in the trade list
- Select Report → Save as CSV
- Save the file
Importing Into AlgoChef
- Navigate to Strategy Hub → Import
- Upload your MetaTrader CSV file
- Use the column mapping wizard to match your columns to AlgoChef fields
- Set your Initial Capital
- Click Import
MetaTrader Column Reference
| MetaTrader Column | AlgoChef Field |
|---|---|
| Open Time | Entry Date |
| Close Time | Exit Date |
| Profit | Profit/Loss ($) |
| Type (buy/sell) | Side |
| Volume | Quantity |
| Open Price | Entry Price |
| Close Price | Exit Price |
| Commission | Commission |
| Swap | — (not mapped) |
Tip
The Swap column (overnight financing cost) is not mapped by AlgoChef. If swap costs are significant for your strategy, add them manually to your P&L column before importing.
Troubleshooting
Profit showing as negative when it should be positive? MT4 sometimes exports short trade profits as negative values in the wrong column. Verify the sign convention in your export matches what AlgoChef expects — a winning trade should have a positive P&L value.
Trades missing from export? Make sure your date range filter in the Account History tab includes the full backtest period. MT4 sometimes defaults to the last month only.
Currency mismatch? AlgoChef expects P&L in your account's base currency. If your MT4 account trades in a different currency, convert before importing or adjust your Initial Capital accordingly.
Next Steps
- CSV Format Reference — Full field specifications
- Understanding Your Dashboard — What to do after import
- Run Monte Carlo Simulation — Stress-test your imported strategy
Tip
Ready to analyze your own strategy? Start your free trial — no credit card required.