A local, walker-style evolutionary search for copy-signal filters, with a built-in primer on reading gold (XAU/USD) and pairs such as EUR/USD. Import a chronological trade CSV; candidate genomes compete on the training segment using selection, crossover and mutation, then the chosen filter is measured on the untouched holdout. Your data stays in this browser tab and is not uploaded or saved automatically.
No system can find the “right deal” every time. This is a historical research/backtest aid, not a profit predictor. Markets change and genetic search can overfit. It never connects to a broker, sends an order, copies a live signal, or guarantees a result. Start in a MetaTrader Strategy Tester/demo environment and get qualified financial advice where needed.
The lab can only learn from the columns you give it, so it pays to know what those columns mean in the market. This is the short version: how a quote works, where “points” come from, what moves gold and EUR/USD, and how each of those becomes a column in your CSV. It is explanation, not trading advice.
EUR/USD 1.0850 — one euro costs 1.0850 US dollars. First currency = base (what is bought), second = quote (what you pay with). Up = base stronger, quote weaker.XAU/USD 2,650.00 — one troy ounce of gold priced in US dollars. XAU is the market code for gold (XAG is silver). Gold has no country and pays no yield, so it behaves less like a currency and more like the market's standing position against the dollar.USD/JPY 150.00 — one dollar buys 150 yen. Quote-JPY pairs move the other way and their point size differs.EUR/GBP or GBP/JPY are two dollar legs combined: EUR/GBP = (EUR/USD) ÷ (GBP/USD).EURUSD and XAUUSD, but some brokers label gold GOLD, XAUUSD.m or similar. Market Watch → Specification tells you the real digits, point size and contract size for your broker.“Gold stock” is three different things. On a stock exchange you may be watching the metal itself (spot XAU/USD), a gold ETF (a share that tracks the metal minus a fee), or gold-mining shares (an equity that adds company risk, costs and leverage to the metal). They are correlated but not the same trade: a miner can fall while the metal rises.
0.00001. Three-digit USD/JPY → point = 0.001. Gold is usually two-digit → point = 0.01, but some brokers quote three digits (0.001).0.0001) — ten five-digit points. Gold traders usually just count dollars.| Trade | Move | Points (point size) |
|---|---|---|
| Buy EUR/USD 1.08432 → close 1.08517 | +0.00085 | 85 (0.00001) |
| Sell EUR/USD 1.08517 → close 1.08432 | −0.00085 for the pair, +85 for you | 85 (0.00001) |
| Buy XAU/USD 2648.35 → close 2651.20 | +2.85 | 285 (0.01) |
| Sell XAU/USD 2651.20 → close 2649.50 | +1.70 | 170 (0.01) |
Shorts profit when the price falls, so a sell that catches a 170-point drop is a 170-point win. That is why the lab needs the side column when it has to derive points itself.
| Window (UTC) | Session | What it usually feels like |
|---|---|---|
| 21:00–06:00 | Sydney / early Asia | Thin, gaps, wide spreads |
| 00:00–09:00 | Tokyo | Ranges; EUR/USD often drifts |
| 07:00–16:00 | London | Trends form; most gold volume is fixed here |
| 12:00–21:00 | New York | US data, afternoon reversals |
| 12:00–16:00 | London + New York overlap | Deepest liquidity, biggest moves |
| 21:00–22:00 | Rollover | Spreads widen, swaps are booked |
Two fixed points worth memorising: the London gold reference price is set at 15:00 GMT, and the big US releases land at 13:30 UTC (08:30 New York). Gold and EUR/USD both jump on US data, which is exactly when copy-trading is most likely to be late and most expensive.
| CSV column | What it captures in the market | Where you get it |
|---|---|---|
time | Session and news window; the lab derives an hour-of-day gene from it | MT4/MT5 history “open time”, or your EA log |
symbol | Which instrument the row belongs to, so a mixed file can be split | History export |
side | Buy or sell — needed to turn prices into signed points | History export |
pnl_points | Result in your broker's points, costs already included | History export, or entry/close prices × side ÷ point size |
signal_score | How confident the copied signal was at the moment it fired (0–100) | Your signal provider / EA |
spread_points | Cost of copying: spreads widen at rollover and at news | MarketInfo(Symbol(),MODE_SPREAD) / SymbolInfoInteger |
copy_delay_seconds | Latency between the signal firing and your fill | EA timestamp comparison |
mfe_points / mae_points | Best and worst excursion while the trade was open — the only honest basis for TP/SL research | EA logging on tick data |
Only use values that were knowable at copy time. A column filled in after the trade closed (final price, final profit) is information from the future and will make the search look brilliant and be worthless.
At least 30 valid trades are needed. Include a parseable time / datetime / timestamp so rows are sorted oldest to newest — add a Z or an offset if you want the session-hour filter to be read as UTC. Without readable times, CSV order is treated as chronology, so put the oldest row first. Keep points on one basis per run (one symbol, or the same point size). The pnl_points column must be signed and should already include trading costs. If you instead provide entry/close prices and side, enter the broker point size below.
The two example buttons fill the box with invented, illustrative rows — deterministic synthetic data shaped so a session-and-spread filter helps, not real market history. They exist so you can watch the search work before you trust it with your own export.
pnl_points (or profit_points / points), or side + entry_price + close_price.signal_score (0–100), spread_points, copy_delay_seconds, side, symbol and time.mfe_points and mae_points on every row to test take-profit / stop-loss thresholds. If both thresholds were touched, the lab assumes the stop was hit first because MFE / MAE does not reveal intrabar order.symbol drives the instrument selector below, and time drives an optional session-hour gene (a UTC hour window the signal is allowed to be copied in).MT4 / MT5 history reports vary by broker and may not contain signal score, copy delay or maximum favourable/adverse excursion. Signal scores must be 0–100; MFE / MAE are non-negative point magnitudes. Add those fields from your own EA/logging if you want the search to learn them, and use only values known at copy time—not information learned after the trade. A basic account-history export alone cannot reveal a future winning trade.
time,symbol,side,pnl_points,signal_score,spread_points,copy_delay_seconds,mfe_points,mae_points2026-01-02T09:00:00Z,EURUSD,buy,18,78,12,1,25,6
Use the same broker “point” definition throughout. If you only have entry and close prices, set point size explicitly (for example, 0.00001 for a five-digit EUR/USD quote, 0.01 for a two-digit gold quote; check your symbol specification).
Optional. Fills in the typical value for the detected symbol (about 1.00 per point per lot on EUR/USD and on XAU/USD), then the results gain an account-currency row. Anything else needs your broker's Specification: contract size × point size, in the quote currency.
The stability check runs the identical search with the next four seeds and reports how far the thresholds and the holdout result move. A filter that only works on one seed is a coincidence, not a rule.
Fitness rewards net points and penalizes historical drawdown and losing streaks. Candidates must retain at least 15% of training trades (minimum four) so the search cannot “win” by selecting one lucky trade. Every candidate bound and feature is learned from the training segment only; holdout values never expand the search space.
Import or paste a normalized trade CSV, then run the offline evolutionary search.
Results will show the all-trades baseline beside the evolved filter for training and holdout periods.
After a run, these produce MQL4 and MQL5 gate snippets for an existing EA. They only accept or reject a signal; they contain no order-sending code. Replace the example score, side and age arguments with variables from your own copier.
Integration boundary: these are not complete Expert Advisors and do not connect to a signal provider, read credentials, size positions, place orders, or manage exits. Your EA must supply score (0–100), side (+1 buy / −1 sell), and signal age in seconds. The session window uses the terminal's own Hour(), so set the terminal's time zone (or convert the hours) to match the clock in your CSV. A threshold learned on one account, broker or period may fail elsewhere.