Concordat
- Experts
-
Alex Amuyunzu Raymond
I’m an experienced MQL5 developer and software engineer specializing in building robust, high-performance algorithmic trading systems for MetaTrader 5. My work goes beyond standard EA development — I design intelligent, scalable solutions that combine market logic, automation, and external - 버전: 1.12
- 활성화: 5
The EA That Refuses To Trade Until It Has Earned The Right To.
The Problem Nobody In This Market Wants To Say Out Loud
Retail CFD trading in Europe is not a hard game because the markets are hard. It is a hard game because almost everyone playing it is doing the exact opposite of what the data says they should do. The AMF studied 14,799 active French CFD and forex clients and found that 89.4% lost money. The average loss was €10,887. The median loss was €1,843. And the finding that should end every argument about "discipline" and "screen time": more trading meant bigger losses, with no learning effect. The AMF repeated the study, controlled for experience, and the result did not move. Brokers now self-report 72% to 82% of accounts losing. Consob adopted permanent CFD restrictions in Italy in 2019. Germany tightened turbo and CFD rules in June 2026. ESMA capped leverage at 30:1 on majors and 20:1 on indices, mandated negative balance protection, and forced a 50% margin close-out.
Every regulator in Europe has arrived at the same conclusion from three different directions: the product is not the problem, the behaviour is the problem.
Concordat is a direct answer to that conclusion. Not a signal service. Not a "set and forget profit machine". Not a dashboard with seventeen indicators. Concordat is a MetaTrader 5 Expert Advisor built around one uncomfortable premise: the best trade is usually the one you do not take, and the EA should be able to prove it is allowed to take the ones it does.
The Name
Concordat. From the Latin concordatum, "a thing agreed upon". In history, a concordat is a formal agreement between parties who have every reason to distrust each other, laying out exactly what each side will and will not do. That is precisely what this EA is. A binding agreement between you, the market, and the machine: it will trade only when three independent European indices agree on direction at the same moment, and it will stop itself when the evidence says it has not earned the right to continue.
The name is deliberate. It is not "ProfitBot". It is not "GoldRush". It is not a promise. It is a contract.
What Concordat Actually Does
At 09:00 Central European Time, the cash markets of Frankfurt, Paris, and Milan open together. The DAX, the CAC 40, and the FTSE MIB all print their opening prices within the same minute, on the same daylight saving schedule, under the same ESMA rulebook. This is one of the very few moments in the European trading day where three highly correlated, liquid, well-regulated indices are simultaneously revealing information.
Concordat watches all three. For the first fifteen minutes (configurable), it computes for each index:
-
the opening range high and low
-
the first-candle direction — where the opening window closed inside its own range
-
the gap versus the prior session close, normalised in ATR units
-
the participation ratio — the opening window's tick volume divided by the median of the same window over the prior 20 sessions
Each index is then scored and either becomes eligible or is rejected with a visible reason code. An index is eligible only if participation exceeds a threshold, the gap is within sane bounds, the opening range is non-degenerate, and the first-candle direction agrees with the gap context.
Then the consensus rule fires. Concordat will only consider a trade if at least two of the available indices agree on direction and at least one of them is eligible. When they agree, it takes only the single highest-scoring eligible index. Never two. Never three. Correlated indices moving together are one signal, not three, and treating them as three would triple the risk for a fraction of the information.
Entry is a stop order beyond that index's opening range. Stop loss sits on the opposite side of the range, capped by an ATR multiple. Take profit is a fixed R multiple. If the entry has not triggered by a configurable deadline, the pending order is cancelled. If a position is open at the session flat time, it is closed. One trade per day, maximum.
On most days, Concordat does nothing. That is not a bug. That is the entire point.
The Kill Gate — The Feature That Makes Concordat Different
Most EAs claim an edge. Almost none can prove it. Concordat ships with a built-in kill gate that runs in two modes and is capable of switching the EA off by itself.
In backtest mode, you run the EA twice over the same period: once with real signals, once in placebo mode (identical bracket, identical timing, randomised direction from a fixed seed). The gate then reads both CSV files and evaluates the full kill criteria:
| Criterion | Threshold |
|---|---|
| Net expectancy above placebo | ≥ +0.10 R |
| Bootstrap 95% CI on the delta | entirely above zero |
| Expectancy at 2× costs | positive |
| Profit factor | ≥ 1.25 |
| Trade count | ≥ 300 |
| Positive years | ≥ 70% of years |
| Any single year's share of total profit | ≤ 40% |
| Neighbouring-parameter stability | required |
If any criterion fails, OnTester returns −1.0. The run is dead. You do not get to "tune" your way to a pass. You do not get to cherry-pick the years. The gate is a wall, not a filter.
In live mode, the gate cannot fabricate a placebo counterfactual, and Concordat is honest about that in the code and on screen. Instead, it enforces the subset it can verify from its own trade history: profit factor, expectancy at doubled costs, positive-year share, and single-year concentration. When any of those fails, the EA stops taking new entries and states the reason in the status line. It does not flatten open positions on a daily review, because a hard stop already protects each trade and panic-closing on a schedule would be worse than letting the stop do its job. That trade-off is documented, not hidden.
This is the feature serious buyers will care about most. Anyone can sell an EA. Almost no one ships one that is designed to disqualify itself.
Risk Engine — Priority One
-
Fixed-fraction sizing. Default 0.5% of equity per trade. Or absolute money if you prefer. Never leverage-derived, never assumed contract size.
-
Sizing from tick value and tick size. The EA reads SYMBOL_TRADE_TICK_VALUE and SYMBOL_TRADE_TICK_SIZE from the broker and derives lots from first principles. Works with EUR, USD, GBP, CHF, JPY account currencies.
-
Pre-trade risk verification. The computed loss at stop must not exceed the risk budget. If the broker's lot step, minimum volume, or maximum volume makes the intended risk impossible, the EA refuses the trade. It does not round up into danger.
-
Post-fill verification. After a fill, the actual risk is checked against the intended risk. Any discrepancy is logged.
-
Hard lot cap. A separate absolute ceiling on volume, independent of the risk calculation.
-
Equity-based drawdown halts. Daily halt at 3% (configurable). Total halt at 12% (configurable). Both measured on equity, not balance, so open losses count.
-
News filter. Uses the built-in MT5 economic calendar to block entries in a configurable window around high-impact EUR, USD, and GBP events. Degrades gracefully if the calendar is unavailable.
-
Spread guard. At the open, spreads widen. Concordat refuses entry if the current spread exceeds a multiple of the median spread it has recorded for that index. If it has not yet accumulated enough samples (a cold backtest), it falls back to an ATR-based threshold. This limitation is stated openly in the code.
-
No martingale. No grid. No averaging down. No recovery sizing. Every order has a hard stop attached at order time. This is non-negotiable and enforced by structure, not by comment.
Testing Discipline — Built For People Who Want Evidence
Concordat ships with every tool needed to test it honestly:
-
Placebo mode. Same bracket, same timing, randomised direction from a deterministic seed. This is the counterfactual.
-
Consensus on/off switch. So you can measure exactly what the three-index consensus filter adds over a single-index version.
-
Per-index enable switches. Test DAX alone, CAC alone, MIB alone, or any combination.
-
Cost-stress inputs. Add extra spread and extra slippage in points. Run at 1×, 2×, 3× costs.
-
Per-trade CSV export. Every trade writes: timestamp, index, direction, score, spread at entry, R multiple, costs, lots, risk, entry, stop, target, module. Clean schema. Easy to import into R, Python, or a spreadsheet.
-
Custom OnTester criterion. Returns the penalised delta R if the gate passes, −1.0 if it fails. Sort your optimisation runs directly by this. It is the criterion, not a derived metric.
-
Module M2 (off by default). A GER40 overnight-drift hypothesis, near the Xetra close, flat after the next open, net of swap. It is a mechanism, not a validated edge, and it is disabled until you enable it deliberately.
The kill gate criteria above are the published gate. If you cannot reproduce them, do not trade the EA.
The Trading Reality
Concordat is designed to trade rarely. On a typical month, most days will produce no signal at all. The consensus rule is strict on purpose. Participation thresholds are set on purpose. The gap filter exists on purpose. The spread guard exists because the open is when brokers widen spreads most aggressively.
When Concordat does trade, it trades one index, with a hard stop, with a fixed fractional risk, with a deadline, with a session flat, and with a kill gate watching the aggregate performance in the background.
You will not see a trade every day. You will not see a trade every week. You will see fewer trades than any other EA you have probably ever run. That is the design. The AMF data is unambiguous: the more retail traders trade, the more they lose. Concordat's entire architecture is a response to that finding.
What Concordat Is Not
-
It is not a profit guarantee. No EA can be.
-
It is not financial advice.
-
It is not a signal service.
-
It is not a "set and forget" product. It is a testing and execution framework for a specific hypothesis, with real risk controls.
-
It is not for people who want a trade every hour, or a dashboard with fifteen indicators, or a Telegram channel. None of those exist here, by design.
-
It is not for anyone who cannot accept that most retail CFD accounts lose money, and who therefore needs a product that respects that fact rather than pretending otherwise.
Who This Is For
-
Serious retail traders in France, Germany, and Italy who already trade their home index CFDs and are tired of losing money through overtrading.
-
Systematic traders who want a MetaTrader 5 EA they can audit, test, and kill on their own terms.
-
Prop-firm candidates who need disciplined, low-frequency, hard-stopped exposure to European indices under ESMA rules.
-
Anyone who has bought an EA before, watched it curve-fit, and wants a product whose first feature is the ability to disqualify itself.
Technical Summary
| Property | Value |
|---|---|
| Platform | MetaTrader 5 |
| File | One .mq5 , compiles with zero errors and zero warnings |
| Dependencies | Trade\Trade.mqh only. No DLLs. No external libraries. |
| Symbols | GER40/DE40/DAX40/GER30, FRA40/F40/FR40/CAC40, ITA40/IT40/MIB40/FTSEMIB — auto-detected |
| Session | 09:00 CET / CEST cash open, DST handled in code |
| Timeframe | M1 for opening range, D1 for ATR and prior close |
| Account currencies | EUR, USD, GBP, CHF, JPY |
| Inputs | 40, grouped (Symbols, Strategy, Risk, Filters, Testing, Kill Gate, Identity) |
| Code size | ~1,370 lines, single file, fully written, no placeholders |
| Kill gate | Implemented, two modes, active in live and tester |
| Risk controls | Fixed-fraction sizing, hard lot cap, daily and total equity halts, spread guard, news filter, hard stop on every order |
| Testing tools | Placebo mode, consensus switch, per-index switches, cost stress, per-trade CSV, custom OnTester |
| Trade frequency | Rare by design |
A Closing Note
The single most important sentence in the AMF's research is not "89.4% lost money". It is "more trading meant bigger losses, with no learning effect". That sentence describes a structural problem, not a skills problem. It is not solved by trying harder. It is solved by trading less, sizing correctly, stopping yourself, and refusing to continue when the evidence does not support it.
Concordat is a machine built to do those four things.
Concordat. The EA that refuses to trade until it has earned the right to.
