 feat(warrior): the vol-gated dip-buy book, ported into Warrior_EA
Warrior's defaults are now the validated book: DIP_ZSCORE alone, long only, H4,
risk 0.25%, one chart per index with a shared Magic.
- System/BarCache.mqh: whole-history closed bars, Wilder ATR, GK sigma and the
expanding vol percentile (no 1024-bar stdlib ceiling)
- System/AccountGuard.mqh: open-risk cap, kill switch, cross-chart lock and
Friday flat, shared through terminal globals by Magic
- CWarriorExpert: guard on every tick; a transient open failure retries the bar
- CWarriorSignal::SetupStop: the dip owns its 3 x Wilder ATR stop from the bid
- SignalDipBuy: no entry vote while holding (a still-dipping time exit never
closed, and Processing re-entered on the exit bar); no entry on a stop bar
- WarriorMoney sizes on equity; WARRIOR_RISK allows fractional risk
- TradeLog + research/compare_ea.py: trade-for-trade check vs WarriorDipZ -
SP500/US30/DAX40 identical to the cent, NAS100 96.9% (stale-quote timer fills)
- research/nn_cross_index.py: pre-registered cross-index NN meta-label - FAIL
(AUC 0.564, CI [0.498, 0.630]); DipMetaCut stays off
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:14:53 -04:00 | | | """Write tester .ini files into the fleet terminal's data dir, every input pinned.
|
| | |
|
| | | python mql5/make_inis.py warrior <tag> SYM [SYM ...] [key=value ...]
|
| | | python mql5/make_inis.py dipz <tag> SYM [SYM ...] [key=value ...]
|
| | |
|
| | | The tester INHERITS any input an .ini leaves out from the last run, so both
|
| | | templates list every input the EA declares; key=value overrides one of them
|
| | | (or a [Tester] key such as FromDate / Model).
|
| | | """
|
| | | from __future__ import annotations
|
| | | import sys
|
| | |
|
| | | DATA = r"C:\Users\admin\AppData\Roaming\MetaQuotes\Terminal\10CE948A1DFC9A8C27E56E827008EBD4"
|
| | |
|
| | | TESTER = dict(Period="H4", Model="1", FromDate="2022.01.01", ToDate="2026.09.01",
|
| | | ForwardMode="0", ForwardDate="2026.09.01", Deposit="100000", Currency="USD",
|
| | | Leverage="1:100", Optimization="0", Visual="0", ReplaceReport="1")
|
| | |
|
| | | WARRIOR = dict(
|
| | | Magic="20260911", EveryTick="false", ThresholdOpen="15", ThresholdClose="50", Direction="1",
|
| | | FadeCrowd="0", MoneyMode="0", Risk="25", FixedLots="0.01", StopMode="3", TargetMode="0",
|
| | | TrailMode="0", BreakevenAt="0", ManagementCut="0", MaxOpenRiskPct="0.75", KillSwitchDD="4.5",
|
| | | FridayFlatMin="170", TradeLog="true",
|
| | | **{w: "100" for w in ["W_MA", "W_RSI", "W_MACD", "W_CCI", "W_Stoch", "W_WPR", "W_RVI", "W_SAR",
|
| | | "W_AO", "W_AC", "W_Ichimoku", "W_WyckoffEv", "W_WyckoffSt", "W_Neural",
|
| | | "W_Regime", "W_DipBuy"]},
|
| | | UseClassics="false", UseWyckoff="false", UseRegime="false", UseDipBuy="true", DipEntry="1",
|
| | | DipZ="1.5", DipExitMA="20", DipTrendMA="0", DipMaxBars="10", DipVolGate="true",
|
| | | DipVolPct="0.5", DipMetaCut="50", DipMetaRefit="500", UseNeural="false", NeuralCut="50",
|
| | | UseDatabase="false", DB_RankingFeedsWeights="false", AtrPeriod="14")
|
| | |
|
| | | DIPZ = dict(InpTF="16388", InpZPeriod="20", InpZEntry="-1.5", InpMaxBars="10", InpStopATR="3.0",
|
| | | InpATRPeriod="14", InpRiskPct="0.25", InpVolGate="true", InpVolPct="0.5",
|
| | | InpVolWindow="30", InpVolWarm="250", InpMaxOpenRiskPct="0.75", InpMaxDDPct="4.5",
|
| | | InpFridayFlatMin="170", InpMagic="20260922", InpJournal="true", InpEquityLog="false")
|
| | |
|
2026-09-23 21:15:00 -04:00 | | | EXPERT = {"warrior": r"Warrior\Warrior_EA", "dipz": r"Warrior\WarriorDipZ"}
|
 feat(warrior): the vol-gated dip-buy book, ported into Warrior_EA
Warrior's defaults are now the validated book: DIP_ZSCORE alone, long only, H4,
risk 0.25%, one chart per index with a shared Magic.
- System/BarCache.mqh: whole-history closed bars, Wilder ATR, GK sigma and the
expanding vol percentile (no 1024-bar stdlib ceiling)
- System/AccountGuard.mqh: open-risk cap, kill switch, cross-chart lock and
Friday flat, shared through terminal globals by Magic
- CWarriorExpert: guard on every tick; a transient open failure retries the bar
- CWarriorSignal::SetupStop: the dip owns its 3 x Wilder ATR stop from the bid
- SignalDipBuy: no entry vote while holding (a still-dipping time exit never
closed, and Processing re-entered on the exit bar); no entry on a stop bar
- WarriorMoney sizes on equity; WARRIOR_RISK allows fractional risk
- TradeLog + research/compare_ea.py: trade-for-trade check vs WarriorDipZ -
SP500/US30/DAX40 identical to the cent, NAS100 96.9% (stale-quote timer fills)
- research/nn_cross_index.py: pre-registered cross-index NN meta-label - FAIL
(AUC 0.564, CI [0.498, 0.630]); DipMetaCut stays off
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:14:53 -04:00 | | |
|
| | | if __name__ == "__main__":
|
| | | kind, tag, rest = sys.argv[1], sys.argv[2], sys.argv[3:]
|
| | | syms = [a for a in rest if "=" not in a]
|
| | | over = dict(a.split("=", 1) for a in rest if "=" in a)
|
| | | inputs = dict(WARRIOR if kind == "warrior" else DIPZ)
|
| | | tester = dict(TESTER)
|
| | | for k, v in over.items():
|
| | | if k in tester:
|
| | | tester[k] = v
|
| | | elif k in inputs:
|
| | | inputs[k] = v
|
| | | else:
|
| | | if k != "Expert":
|
| | | sys.exit(f"unknown key {k}")
|
| | | expert = over.pop("Expert", EXPERT[kind])
|
| | | for sym in syms:
|
| | | name = f"claude_{tag}_{sym}"
|
| | | lines = ["[Tester]", f"Expert={expert}", f"Symbol={sym}"]
|
| | | lines += [f"{k}={v}" for k, v in tester.items()]
|
| | | lines += [f"Report={name}", "", "[TesterInputs]"]
|
| | | lines += [f"{k}={v}" for k, v in inputs.items()]
|
| | | with open(rf"{DATA}\{name}.ini", "w", encoding="ascii", newline="\n") as f:
|
| | | f.write("\n".join(lines) + "\n")
|
| | | print(name)
|