Files
MBT/config.example.yaml
T
FXDavidandClaude Opus 4.8 0a8fa54e05 Add EA build/test/verify tools: compile_ea, run_strategy_tester, signal_parity
Three MCP tools that drive MT5's own toolchain, complementing the Python signal
replay, so a strategy can go from indicator to executable EA and be verified:
- compile_ea       — MetaEditor compile -> structured errors/warnings.
- run_strategy_tester — MT5's headless Strategy Tester (real spread/swaps/exec)
                     -> parsed metrics + the EA's OnTester() summary cross-check.
- signal_parity    — mechanical bar-by-bar diff of two signal sets -> first
                     divergence (deterministic "did the port drift?" check).

Cross-platform: on Linux/macOS the tester runs through Wine (config path is
translated via winepath; `tester.portable` launches the terminal /portable for
installs that keep data beside the exe). No-op passthrough on native Windows.

Adds the tester: block to config.example.yaml and a README "Use it" section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 02:56:34 -07:00

49 lines
2.4 KiB
YAML

# MBT — MT5 Backtest Toolkit configuration
# Copy this file to config.yaml and edit the values for your setup.
# Full path to the terminal64.exe of the MT5 instance your indicator runs on.
# Right-click your MT5 shortcut -> Properties -> Target to find it.
mt5_path: "C:/Path/To/Your/terminal64.exe"
# The signal file your indicator writes (via SignalLogger.mqh).
# Either a bare filename (looked up inside the MT5 .../MQL5/Files folder)
# or an absolute path to the CSV.
signal_file: "signals.csv"
# Defaults used when the signal CSV rows don't carry their own symbol/timeframe.
default_symbol: "EURUSD"
default_timeframe: "1h"
# How to resolve a bar whose high-low range contains BOTH the SL and the TP
# (you cannot tell from OHLC which was touched first):
# loss -> count it as a stop-out (conservative, recommended)
# win -> count it as a target hit (optimistic)
ambiguous_bar: "loss"
# Where generated HTML reports are written (relative to the MBT folder).
reports_dir: "reports"
# Spread + slippage allowance in points, used to estimate transaction cost per trade.
# 5 is a reasonable default for most forex pairs; increase for gold/indices.
slippage_points: 5.0
# Risk per trade as a decimal (0.01 = 1%) — used only to translate R units into
# account-percentage returns in the backtest report. Does not affect WIN/LOSS outcomes.
risk_per_trade: 0.01
# --- Real MT5 Strategy Tester runner (run_strategy_tester tool) ---------------
# Optional. Drives MT5's own Strategy Tester headlessly to backtest an Expert
# Advisor's real code (real spread/swaps/execution), complementing the signal
# replay above. Off-Windows a launcher such as "wine" is prepended automatically.
tester:
terminal_path: "" # full path to terminal64.exe; blank -> falls back to mt5_path
metaeditor_path: "" # blank -> MetaEditor64.exe next to terminal64.exe
data_dir: "" # MT5 data/install dir; blank -> derived from terminal_path folder
common_files: "" # MetaQuotes Common/Files dir (where EA OnTester summaries land); blank -> auto
launcher: "" # blank on Windows; "wine" off-Windows (auto-defaulted)
portable: false # set true if the install keeps its data beside the exe -> launch terminal /portable
default_deposit: 10000
default_leverage: 100
default_model: "open_prices" # every_tick | 1min_ohlc | open_prices | math | real_ticks
timeout_sec: 1800