Skip to main content
Finance & InvestingBanking Finance Pro38 lines

MetaTrader 5 and MQL5 Strategy Testing

Validate Expert Advisor behavior in the MT5 tester with reproducible inputs, broker constraints and out-of-sample checks.

Quick Summary8 lines
Use this skill to develop and evaluate an MQL5 Expert Advisor in a tester or an explicitly authorized demo environment. Record the broker, symbol specification, terminal build, source revision, account model and test dates. Keep live trading disabled unless the user separately authorizes actual trading.

## Key Points

- [MetaTrader strategy testing](https://www.metatrader5.com/en/terminal/help/algotrading/testing)
- [Real and generated ticks](https://www.metatrader5.com/en/terminal/help/algotrading/tick_generation)
skilldb get banking-finance-pro-skills/metatrader-mql5-strategy-testingFull skill: 38 lines
Paste into your CLAUDE.md or agent config

MetaTrader 5 and MQL5 Strategy Testing

Use this skill to develop and evaluate an MQL5 Expert Advisor in a tester or an explicitly authorized demo environment. Record the broker, symbol specification, terminal build, source revision, account model and test dates. Keep live trading disabled unless the user separately authorizes actual trading.

Make the EA observable

Define the signal timing, order rules, position sizing, exit logic and handling of existing positions. Distinguish netting and hedging account behavior. Read symbol properties for price precision, tick size, volume limits, volume step and trading constraints rather than hard-coding assumptions from one instrument.

Log decisions, rejected conditions, trade requests and returned result codes with enough context to reproduce failures. Do not equate a successful request with an executed deal; reconcile orders, deals and positions through the supported trade state. Prevent duplicate orders when events or reconnects repeat.

Compile without unexplained warnings. Test initialization failure, insufficient history, missing indicator values and an unavailable trading session. A failed precondition should prevent trading rather than substitute a plausible value.

Choose a meaningful simulation

Select a modeling mode consistent with the strategy. Open-prices-only testing cannot establish the correctness of intrabar decisions. Broker real-tick history can improve realism, but inspect data gaps and the tester's fallback behavior. Bid, ask and chart price are not interchangeable execution prices.

Include spread, commission, swaps and realistic delay assumptions. Check symbol and account currency conversion. Avoid presenting simplified profit-in-pips runs as complete margin or cost simulations.

Preserve the exact inputs and tester report. Inspect the journal for shifted dates, missing history or rejected orders. Use visual mode or event traces to examine a few representative entries and exits rather than relying only on the equity curve.

Separate optimization from evaluation

Keep a chronological forward period outside parameter fitting. Record the parameter search range and number of attempts. Compare against simple benchmarks and test sensitivity to costs, delay and nearby parameter values.

Exercise no-trade periods, gaps, stop handling, partial fills where supported and restart recovery. Report drawdown, exposure, trade count and execution errors alongside return.

Deliver source, build information, tester settings, reports and unresolved assumptions. Clearly label simulated and demo results. Passing the tester is evidence about that configuration; it does not guarantee profitable live operation or authorize enabling an automated account.

References

Install this skill directly: skilldb add banking-finance-pro-skills

Get CLI access →

Related Skills

Private Equity

Expert guidance on private equity fund structure, deal sourcing, due diligence, transaction execution, portfolio company value creation, and exit planning across buyout, growth equity, and special situations strategies.

Banking Finance Pro•61L

Venture Capital

Expert guidance on startup evaluation, term sheet negotiation, portfolio construction, board governance, follow-on strategy, and the full venture capital lifecycle from fund formation through exits across seed, early, and growth stages.

Banking Finance Pro•62L

Wealth Management

Comprehensive guidance on portfolio construction, client advisory relationships, asset allocation strategies, estate planning considerations, and holistic wealth preservation for high-net-worth and ultra-high-net-worth individuals and families.

Banking Finance Pro•62L

Commercial Banking

Expert guidance on commercial lending, credit analysis, relationship management, treasury services, and the end-to-end commercial banking process from client origination through portfolio management and workout scenarios.

Banking Finance Pro•62L

Commodities Trading

Expert guidance on commodities trading across energy, metals, and agriculture including futures and options strategies, physical versus paper market dynamics, fundamental supply-demand analysis, and risk management for commodity price exposure.

Banking Finance Pro•62L

Credit Analysis

Expert guidance on credit scoring methodologies, corporate and consumer credit risk assessment, covenant analysis, credit rating frameworks, distressed credit evaluation, and the structured approach to determining creditworthiness and appropriate lending terms.

Banking Finance Pro•62L