Donchian_Reversion_MM — Fixes
Every defect the audit found and how it was repaired — the same measurements as the engineering record, without the code.
2 issues found and repaired — 1 defect, 1 warning.
| # | Issue | Severity | Surface |
|---|---|---|---|
| 1 | Twelve diagnostic messages bypassed the log format | WARNING | console |
| 2 | Three defects this file would have carried were already repaired across its family | DEFECT | inherited |
Every fix was verified by re-running the full backtest across all 7 markets and comparing the result record against the pre-fix baseline. Where a fix is stated to change no behaviour, the two records are identical to the byte.
Twelve diagnostic messages bypassed the log format
Severity WARNING · Surface console · Sites 12
Order rejections, blocked orders and reconcile events were emitted as bare strings: Buy blocked: qty rounds to zero. No strategy name, no tag, no colour.
Why it matters. In a terminal running many pairs at once that line does not say which pair or which strategy produced it, and it is exactly the class of event the palette reserves amber for — the strategy wanted to act and could not. On a strategy taking 415 round trips per market, a rejection that scrolls past unattributed is the difference between a working ladder and one with a hole in it.
Call sites by format
| before | after | |
|---|---|---|
| tagged, aligned, coloured | 6 | 18 |
| raw and off-format | 12 | 0 |
| exempt (object/error dumps, pre-scope sanity waits) | 7 | 7 |
The fix. Routed the string-literal sites through the tagged log emitter that already existed in the same scope, with the tag and palette colour the event calls for. Object dumps and the two top-of-file sanity waits are left alone — the waits run before that emitter is in scope, and a dump has no message to tag.
Effect on live behaviour. None. Verified by re-running the full 3-year backtest on all 7 markets and diffing the result record against the pre-fix baseline: identical, including trade counts, fills, rejects and every metric.
Scope beyond this strategy. The same call sites exist across the 348 Gunbot Quant strategies — they predate the tagged format rather than deviating from it.
Three defects this file would have carried were already repaired across its family
Severity DEFECT · Surface inherited · Sites 3
Donchian_Reversion_MM is the shared mm-dca template with MM_signal baked to donchian, so it shipped with the same three defects as its fourteen siblings: an MM_fee setting exposed in the GUI and never read, leaving the profit target sitting exactly on the cost of trading; an MM_signal selector labelled "Signal length" and explained as a smoothing lookback, on the knob that decides which of fifteen engines runs; and an MM_fee tooltip that said "round-trip" where the file's own header says Fee % (per side).
Why it matters. The fee one is not cosmetic on this strategy. The profit target is 80.4% of all its exits — 2,018 of 2,509 — so a target that could not clear the cost of exiting was the majority of its behaviour. With the repair the operative target is 0.22% rather than 0.12%, and the target exits realise a mean +0.77%.
This strategy before and after the family fee repair, 3 years × 7 markets
| target on the cost line | target clears the exit fee | |
|---|---|---|
| Median return | -32.83% | -28.82% |
| Median profit factor | 0.737 | 0.762 |
| Median fee drag | 34.78% | 34.66% |
| Markets with a better profit factor | — | 5 / 7 |
| Markets with a better return | — | 5 / 7 |
Across the whole family the same repair improved profit factor on 91 of 98 market runs. This strategy is one of the milder beneficiaries because its indicator exit fires often enough to close many trades before the target is reached.
The fix. MM_GAIN_NET: MM.gain + MM.fee derived once beside the config block and used for both the exit test and the chart line, by the fee-target fixer; the selector and fee copy corrected in the GUI editor by the audit tooling. The full derivation, the arithmetic showing the shipped target landed on the cost line to two parts in ten million, and the family-wide measurement are in the the SuperTrend_MM audit's engineering record.
Effect on live behaviour. Changes behaviour at the shipped defaults, as measured above. It was applied because the previous target was the break-even line rather than a profit target, and because the GUI already promised the operator that the fee setting would widen it.
Scope beyond this strategy. Applied to all 15 mm-dca strategies during the
SuperTrend_MMaudit and measured on every one of them. Recorded here so this strategy's report is complete on its own terms rather than only by reference.