- governance: stage v7.0 review prompts, run book, roadmap/current-status/decision updates, and sprint board state - adapters: capture DASH/trailing-drawdown/state-telemetry strategy work already present in the worktree - tools: capture dashboard console/KPI parser updates, logtriage notes, and runnersweep output Build: previously clean | Tests: previously 511 passing | Includes all open staged files
557 lines
48 KiB
HTML
557 lines
48 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" data-theme="light">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>NT8-SDK v7.0 — Visual Pack</title>
|
||
<style>
|
||
:root{
|
||
color-scheme: light;
|
||
--page:#f9f9f7; --surface:#fcfcfb;
|
||
--ink:#0b0b0b; --ink2:#52514e; --muted:#898781;
|
||
--grid:#e1e0d9; --axis:#c3c2b7; --ring:rgba(11,11,11,0.10);
|
||
--s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s7:#4a3aa7;
|
||
--good:#0ca30c; --warning:#fab219; --serious:#ec835a; --critical:#d03b3b;
|
||
--good-text:#006300;
|
||
}
|
||
:root[data-theme="dark"]{
|
||
color-scheme: dark;
|
||
--page:#0d0d0d; --surface:#1a1a19;
|
||
--ink:#ffffff; --ink2:#c3c2b7; --muted:#898781;
|
||
--grid:#2c2c2a; --axis:#383835; --ring:rgba(255,255,255,0.10);
|
||
--s1:#3987e5; --s2:#d95926; --s3:#199e70; --s7:#9085e9;
|
||
--good-text:#0ca30c;
|
||
}
|
||
*{box-sizing:border-box}
|
||
html,body{margin:0;padding:0}
|
||
body{
|
||
background:var(--page); color:var(--ink);
|
||
font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
|
||
font-size:15px; line-height:1.55;
|
||
}
|
||
.wrap{max-width:1180px;margin:0 auto;padding:32px 24px 96px}
|
||
header.top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;flex-wrap:wrap;margin-bottom:8px}
|
||
h1{font-size:26px;margin:0 0 4px;letter-spacing:-0.01em}
|
||
.sub{color:var(--ink2);font-size:14px;margin:0}
|
||
button.theme{
|
||
background:var(--surface);color:var(--ink);border:1px solid var(--ring);
|
||
border-radius:8px;padding:7px 14px;font:inherit;font-size:13px;cursor:pointer;
|
||
}
|
||
button.theme:hover{background:var(--grid)}
|
||
nav.toc{display:flex;flex-wrap:wrap;gap:6px;margin:20px 0 32px}
|
||
nav.toc a{
|
||
font-size:12.5px;text-decoration:none;color:var(--ink2);
|
||
background:var(--surface);border:1px solid var(--ring);border-radius:999px;padding:5px 12px;
|
||
}
|
||
nav.toc a:hover{color:var(--ink);border-color:var(--axis)}
|
||
section{
|
||
background:var(--surface);border:1px solid var(--ring);border-radius:12px;
|
||
padding:24px 26px 28px;margin-bottom:22px;
|
||
}
|
||
h2{font-size:19px;margin:0 0 4px;letter-spacing:-0.01em}
|
||
h3{font-size:14.5px;margin:26px 0 10px;color:var(--ink2);text-transform:uppercase;letter-spacing:0.05em;font-weight:600}
|
||
.lede{color:var(--ink2);font-size:14px;margin:0 0 18px;max-width:78ch}
|
||
.note{font-size:13px;color:var(--ink2);margin-top:14px;max-width:82ch}
|
||
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:0.88em;background:var(--grid);padding:1px 5px;border-radius:4px}
|
||
:root[data-theme="dark"] code{background:#262624}
|
||
|
||
/* status chips */
|
||
.chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:999px;white-space:nowrap}
|
||
.chip.ok{background:color-mix(in srgb,var(--good) 16%,transparent);color:var(--good-text)}
|
||
.chip.warn{background:color-mix(in srgb,var(--warning) 26%,transparent);color:var(--ink)}
|
||
.chip.ser{background:color-mix(in srgb,var(--serious) 24%,transparent);color:var(--ink)}
|
||
.chip.crit{background:color-mix(in srgb,var(--critical) 20%,transparent);color:var(--critical)}
|
||
.chip.neut{background:var(--grid);color:var(--ink2)}
|
||
|
||
/* layer stack */
|
||
.layers{display:flex;flex-direction:column;gap:4px}
|
||
.layer{display:grid;grid-template-columns:34px 1fr 190px 116px;gap:12px;align-items:center;
|
||
background:var(--page);border:1px solid var(--ring);border-radius:8px;padding:9px 12px}
|
||
.layer .n{font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;font-size:13px}
|
||
.layer .nm{font-weight:600;font-size:14px}
|
||
.layer .cp{font-size:12px;color:var(--ink2)}
|
||
.layer.adapter{border-left:3px solid var(--s2)}
|
||
.layer.core{border-left:3px solid var(--s1)}
|
||
|
||
/* pipeline */
|
||
.pipe{display:flex;flex-direction:column;gap:3px}
|
||
.stage{display:grid;grid-template-columns:30px 1fr 210px 128px;gap:10px;align-items:center;
|
||
padding:7px 12px;border-radius:7px;background:var(--page);border:1px solid var(--ring);font-size:13.5px}
|
||
.stage .n{color:var(--muted);font-variant-numeric:tabular-nums;font-size:12px;font-weight:700}
|
||
.stage .rr{font-family:ui-monospace,Menlo,monospace;font-size:11.5px;color:var(--ink2)}
|
||
.stage.block{border-color:var(--critical);background:color-mix(in srgb,var(--critical) 9%,var(--page))}
|
||
.stage.suspect{border-color:var(--warning);background:color-mix(in srgb,var(--warning) 12%,var(--page))}
|
||
.stage.sig{border-color:var(--s1);background:color-mix(in srgb,var(--s1) 8%,var(--page))}
|
||
|
||
/* generic table */
|
||
table{border-collapse:collapse;width:100%;font-size:13.5px;margin-top:6px}
|
||
th{text-align:left;font-weight:600;color:var(--ink2);border-bottom:1px solid var(--axis);padding:7px 10px 7px 0;font-size:12.5px}
|
||
td{padding:8px 10px 8px 0;border-bottom:1px solid var(--grid);vertical-align:top}
|
||
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;padding-right:14px}
|
||
tr.total td{border-top:2px solid var(--axis);border-bottom:none;font-weight:700}
|
||
|
||
/* bar chart */
|
||
.chart{margin-top:8px}
|
||
.legend{display:flex;gap:18px;align-items:center;font-size:12.5px;color:var(--ink2);margin-bottom:14px}
|
||
.legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:6px;vertical-align:-1px}
|
||
.frow{display:grid;grid-template-columns:172px 1fr;gap:12px;align-items:center;margin-bottom:9px}
|
||
.flabel{font-size:12.5px;color:var(--ink2);text-align:right}
|
||
.fbars{display:flex;flex-direction:column;gap:3px}
|
||
.fbar{height:13px;border-radius:0 4px 4px 0;position:relative;min-width:2px}
|
||
.fbar span{position:absolute;left:calc(100% + 7px);top:-2px;font-size:11px;color:var(--ink2);font-variant-numeric:tabular-nums;white-space:nowrap}
|
||
.fbar.d{background:var(--s1)}
|
||
.fbar.a{background:var(--s2)}
|
||
|
||
/* composite readout */
|
||
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin-top:16px}
|
||
.tile{background:var(--page);border:1px solid var(--ring);border-radius:10px;padding:14px 16px}
|
||
.tile .k{font-size:11.5px;text-transform:uppercase;letter-spacing:0.05em;color:var(--muted);font-weight:600}
|
||
.tile .v{font-size:27px;font-weight:700;letter-spacing:-0.02em;margin:4px 0 2px;font-variant-numeric:tabular-nums}
|
||
.tile .d{font-size:12px;color:var(--ink2)}
|
||
|
||
/* decision tree */
|
||
.tree{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;line-height:1.75;
|
||
background:var(--page);border:1px solid var(--ring);border-radius:9px;padding:16px 18px;overflow-x:auto;white-space:pre;color:var(--ink2)}
|
||
.tree b{color:var(--ink);font-weight:700}
|
||
.tree .bad{color:var(--critical);font-weight:700}
|
||
.tree .warnc{color:var(--serious);font-weight:700}
|
||
.tree .okc{color:var(--good-text);font-weight:700}
|
||
|
||
/* collision map */
|
||
.cmap{display:grid;grid-template-columns:repeat(auto-fill,minmax(268px,1fr));gap:10px}
|
||
.cell{border:1px solid var(--ring);border-left-width:4px;border-radius:8px;padding:11px 13px;background:var(--page)}
|
||
.cell .t{font-size:13px;font-weight:600;margin-bottom:3px}
|
||
.cell .b{font-size:12px;color:var(--ink2)}
|
||
.cell.crit{border-left-color:var(--critical)}
|
||
.cell.warn{border-left-color:var(--warning)}
|
||
.cell.ser{border-left-color:var(--serious)}
|
||
.cell.ok{border-left-color:var(--good)}
|
||
|
||
/* gap grid */
|
||
.gaps{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
|
||
.gap{border-radius:8px;padding:9px 11px;border:1px solid var(--ring);background:var(--page)}
|
||
.gap .id{font-weight:700;font-size:12.5px;font-family:ui-monospace,Menlo,monospace}
|
||
.gap .txt{font-size:11.5px;color:var(--ink2);margin-top:3px;line-height:1.4}
|
||
.gap.crit{background:color-mix(in srgb,var(--critical) 12%,var(--page));border-color:color-mix(in srgb,var(--critical) 40%,var(--ring))}
|
||
.gap.high{background:color-mix(in srgb,var(--serious) 14%,var(--page))}
|
||
.gap.med{background:color-mix(in srgb,var(--warning) 15%,var(--page))}
|
||
.gap.done{background:color-mix(in srgb,var(--good) 11%,var(--page))}
|
||
|
||
/* roadmap */
|
||
.road{display:flex;flex-direction:column;gap:8px}
|
||
.rstage{display:grid;grid-template-columns:96px 1fr 150px;gap:14px;align-items:center;
|
||
background:var(--page);border:1px solid var(--ring);border-radius:9px;padding:11px 14px}
|
||
.rstage .sn{font-weight:700;font-size:13px}
|
||
.rstage .items{font-size:12.5px;color:var(--ink2)}
|
||
.rstage .dur{font-size:12px;color:var(--ink2);text-align:right;font-variant-numeric:tabular-nums}
|
||
.rstage.now{border-color:var(--s1);border-left:4px solid var(--s1)}
|
||
.rstage.key{border-left:4px solid var(--critical)}
|
||
|
||
/* timeline */
|
||
.tl{position:relative;padding-left:22px}
|
||
.tl::before{content:"";position:absolute;left:6px;top:6px;bottom:6px;width:2px;background:var(--grid)}
|
||
.ev{position:relative;margin-bottom:14px}
|
||
.ev::before{content:"";position:absolute;left:-20px;top:6px;width:9px;height:9px;border-radius:50%;background:var(--axis);box-shadow:0 0 0 3px var(--surface)}
|
||
.ev.sig::before{background:var(--s1)}
|
||
.ev.rej::before{background:var(--critical)}
|
||
.ev .t{font-family:ui-monospace,Menlo,monospace;font-size:12px;color:var(--muted)}
|
||
.ev .m{font-size:13.5px}
|
||
.ev .m b{font-weight:700}
|
||
footer{color:var(--muted);font-size:12.5px;text-align:center;margin-top:36px}
|
||
@media (max-width:820px){
|
||
.layer,.stage{grid-template-columns:26px 1fr}
|
||
.layer .cp,.layer .st,.stage .rr,.stage .st{display:none}
|
||
.frow{grid-template-columns:1fr}
|
||
.flabel{text-align:left}
|
||
.rstage{grid-template-columns:1fr}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="wrap">
|
||
|
||
<header class="top">
|
||
<div>
|
||
<h1>NT8-SDK — Visual Pack v7.0</h1>
|
||
<p class="sub">Companion to <em>NT8_SDK_Master_Document_v7.0_Complete.docx</em> · rev B · evidence as of 2026-08-18 · repo <code>C:\dev\nt8-sdk</code> @ <code>f617574</code></p>
|
||
</div>
|
||
<button class="theme" id="tt">Dark mode</button>
|
||
</header>
|
||
|
||
<nav class="toc">
|
||
<a href="#arch">1 · Architecture</a>
|
||
<a href="#pipe">2 · Bar→Trade pipeline</a>
|
||
<a href="#risk">3 · Risk tiers</a>
|
||
<a href="#conf">4 · Confluence weighting</a>
|
||
<a href="#runner">5 · Runner economics</a>
|
||
<a href="#collide">6 · Parameter collisions</a>
|
||
<a href="#gaps">7 · Gap register</a>
|
||
<a href="#road">8 · Roadmap</a>
|
||
<a href="#today">9 · 08-18 forensics</a>
|
||
<a href="#clock">10 · 24×5 session clock</a>
|
||
</nav>
|
||
|
||
<!-- 1 ARCHITECTURE -->
|
||
<section id="arch">
|
||
<h2>1 · Nine-layer architecture</h2>
|
||
<p class="lede">Layers 1–8 are platform-free. Layer 9 is the only one that imports NinjaTrader. That separation is real and maintained — it is what makes a broker-neutral platform achievable rather than a rewrite. The status column is honest about which layers are actually load-bearing today.</p>
|
||
<div class="layers">
|
||
<div class="layer core"><div class="n">1</div><div><div class="nm">Strategy</div><div class="cp">IStrategy · SimpleORBStrategy · NT8 wrappers</div></div><div class="cp">Signal only. Emits StrategyIntent</div><div class="st"><span class="chip ok">load-bearing</span></div></div>
|
||
<div class="layer core"><div class="n">2</div><div><div class="nm">Intelligence</div><div class="cp">ConfluenceScorer · 10 × IFactorCalculator · GradeFilter</div></div><div class="cp">Quality gate before risk</div><div class="st"><span class="chip crit">weighting defect</span></div></div>
|
||
<div class="layer core"><div class="n">3</div><div><div class="nm">Risk</div><div class="cp">BasicRisk T1 · AdvancedRisk T2/T3/T3.5 · PortfolioRiskManager</div></div><div class="cp">Four checkpoints per trade</div><div class="st"><span class="chip crit">blocking trades</span></div></div>
|
||
<div class="layer core"><div class="n">4</div><div><div class="nm">Sizing</div><div class="cp">BasicPositionSizer · GradeBasedSizer · VolatilityAdjustedSizer</div></div><div class="cp">Dollar risk → contracts</div><div class="st"><span class="chip ok">load-bearing</span></div></div>
|
||
<div class="layer core"><div class="n">5</div><div><div class="nm">OMS</div><div class="cp">OrderStateMachine · BasicOrderManager · DuplicateOrderDetector</div></div><div class="cp">Thread-safe order lifecycle</div><div class="st"><span class="chip ok">load-bearing</span></div></div>
|
||
<div class="layer core"><div class="n">6</div><div><div class="nm">Analytics</div><div class="cp">TradeRecorder · PerformanceCalculator · MonteCarlo · PnLAttributor</div></div><div class="cp">Measurement, ML dataset</div><div class="st"><span class="chip warn">built, unconsumed</span></div></div>
|
||
<div class="layer core"><div class="n">7</div><div><div class="nm">Execution</div><div class="cp">CircuitBreaker · TrailingStopManager · ExecutionQualityTracker</div></div><div class="cp">Execution safety, fill quality</div><div class="st"><span class="chip ok">wired</span></div></div>
|
||
<div class="layer core"><div class="n">8</div><div><div class="nm">Market Data</div><div class="cp">SessionManager · AVWAPCalculator · LiquidityMonitor</div></div><div class="cp">Context for factors</div><div class="st"><span class="chip warn">depth hardcoded</span></div></div>
|
||
<div class="layer adapter"><div class="n">9</div><div><div class="nm">NT8 Adapter Ring</div><div class="cp">NT8StrategyBase (2,880 lines) · OrderAdapter · DataAdapter · LoggingAdapter</div></div><div class="cp">Only layer importing NinjaTrader</div><div class="st"><span class="chip ok">load-bearing</span></div></div>
|
||
</div>
|
||
<p class="note"><strong>Dead code worth knowing about:</strong> <code>RegimeManager</code>, <code>TrendRegimeDetector</code> and <code>VolatilityRegimeDetector</code> are instantiated in Layer 2 but never called in the live signal path (DEC-20260817-04). The regime values actually used come from inline SMA20/50 arithmetic in <code>BuildStrategyContext()</code>.</p>
|
||
</section>
|
||
|
||
<!-- 2 PIPELINE -->
|
||
<section id="pipe">
|
||
<h2>2 · The bar-to-trade pipeline</h2>
|
||
<p class="lede">Eighteen stages between a bar closing and an order reaching the broker. The order matters: <code>SIGNAL:</code> is written at stage 8, <em>before</em> every risk gate, which is what makes a silent day diagnosable. Red rows are where trades died on 2026-08-18.</p>
|
||
<div class="pipe">
|
||
<div class="stage"><div class="n">1</div><div>CME holiday guard</div><div class="rr">CmeHoliday</div><div class="st"><span class="chip ok">clear</span></div></div>
|
||
<div class="stage"><div class="n">2</div><div>Connection state</div><div class="rr">— (bar skipped)</div><div class="st"><span class="chip ok">clear</span></div></div>
|
||
<div class="stage"><div class="n">3</div><div>Kill switch</div><div class="rr">KillSwitch</div><div class="st"><span class="chip ok">off today</span></div></div>
|
||
<div class="stage"><div class="n">4</div><div>Warm-up — first realtime bar</div><div class="rr">WarmupIncomplete</div><div class="st"><span class="chip neut">17 today</span></div></div>
|
||
<div class="stage"><div class="n">5</div><div>RTH window guard</div><div class="rr">RthGuard</div><div class="st"><span class="chip neut">233 today</span></div></div>
|
||
<div class="stage"><div class="n">6</div><div>ETH telemetry branch → return</div><div class="rr">—</div><div class="st"><span class="chip neut">opt-in</span></div></div>
|
||
<div class="stage"><div class="n">7a</div><div>ORB range established</div><div class="rr">OrbRangeNotEstablished</div><div class="st"><span class="chip ok">OrbReady=True</span></div></div>
|
||
<div class="stage"><div class="n">7b</div><div>Two-bar pullback confirmation</div><div class="rr">OrbRangeNotEstablished</div><div class="st"><span class="chip ok">confirmed</span></div></div>
|
||
<div class="stage"><div class="n">7c</div><div>Direction filters · AVWAP short veto</div><div class="rr">GradeFilter</div><div class="st"><span class="chip ok">passed</span></div></div>
|
||
<div class="stage suspect"><div class="n">7d</div><div>Confluence grade ≥ MinTradeGrade</div><div class="rr">GradeFilter</div><div class="st"><span class="chip ser">GAP-047 suspect</span></div></div>
|
||
<div class="stage"><div class="n">7e</div><div>MaxDailyTrades cap</div><div class="rr">MaxDailyTrades</div><div class="st"><span class="chip ok">not hit</span></div></div>
|
||
<div class="stage sig"><div class="n">8</div><div><strong>SIGNAL: written — unconditional, before all risk gates</strong></div><div class="rr">—</div><div class="st"><span class="chip ok">5 today</span></div></div>
|
||
<div class="stage"><div class="n">9</div><div>Historical replay catch-up block</div><div class="rr">HistoricalReplayCatchup</div><div class="st"><span class="chip neut">317 today</span></div></div>
|
||
<div class="stage"><div class="n">10</div><div>Dynamic ATR stop finalised — <em>before</em> sizing</div><div class="rr">—</div><div class="st"><span class="chip neut">45 ticks</span></div></div>
|
||
<div class="stage block"><div class="n">11</div><div>Trailing drawdown monitor</div><div class="rr">TrailingDrawdownBreach</div><div class="st"><span class="chip crit">27 blocked</span></div></div>
|
||
<div class="stage"><div class="n">12</div><div>Portfolio risk</div><div class="rr">KillSwitch <em>(mislabelled)</em></div><div class="st"><span class="chip ok">passed</span></div></div>
|
||
<div class="stage block"><div class="n">13</div><div><strong>Tier 1 per-trade risk — StopTicks × tickValue ≤ MaxTradeRisk</strong></div><div class="rr">KillSwitch <em>(mislabelled)</em></div><div class="st"><span class="chip crit">5 blocked</span></div></div>
|
||
<div class="stage"><div class="n">14</div><div>Position sizing</div><div class="rr">GradeFilter <em>(mislabelled)</em></div><div class="st"><span class="chip neut">never reached</span></div></div>
|
||
<div class="stage"><div class="n">15</div><div>Circuit breaker</div><div class="rr">KillSwitch <em>(mislabelled)</em></div><div class="st"><span class="chip neut">never reached</span></div></div>
|
||
<div class="stage"><div class="n">16</div><div>Runner mode resolution</div><div class="rr">—</div><div class="st"><span class="chip neut">never reached</span></div></div>
|
||
<div class="stage"><div class="n">17</div><div>SetStopLoss / SetProfitTarget → Enter…Managed</div><div class="rr">—</div><div class="st"><span class="chip crit">0 today</span></div></div>
|
||
<div class="stage"><div class="n">18</div><div>SUBMIT: + provenance row (realtime only)</div><div class="rr">—</div><div class="st"><span class="chip crit">0 today</span></div></div>
|
||
</div>
|
||
<p class="note"><strong>Four rows share the label <code>KillSwitch</code></strong> (stages 3, 12, 13, 15) and four share <code>GradeFilter</code> (7c, 7d, 14). <code>REJECT SUMMARY</code> aggregates on <em>reason</em>, so its counts are ambiguous. On 2026-08-17 a session logged <code>KillSwitch count=647</code> from a genuine kill switch; on 08-18 a session logged <code>KillSwitch count=5</code> from a MaxTradeRisk rejection. Splitting the taxonomy is task P0-C.</p>
|
||
</section>
|
||
|
||
<!-- 3 RISK -->
|
||
<section id="risk">
|
||
<h2>3 · Risk validation — four tiers plus the new monitor</h2>
|
||
<p class="lede">A trade must clear every applicable tier. The annotation on Tier 1 is the most consequential correction in v7.0.</p>
|
||
<div class="tree">
|
||
<b>TIER 1 — BasicRiskManager</b>
|
||
├─ Daily loss P&L ≤ −DailyLossLimit ($1,000) → HALT for the day
|
||
├─ <span class="bad">Per-trade risk StopTicks × tickValue > MaxTradeRisk ($200) → REJECT</span>
|
||
│ <span class="bad">↑ NO QUANTITY TERM. Evaluated BEFORE sizing.</span>
|
||
│ <span class="bad">↑ NQ: caps the stop at 40 ticks. MaxStopTicks is 50.</span>
|
||
│ <span class="bad">↑ 2026-08-18: rejected 5 signals at $225.00 > $200.00</span>
|
||
│ <span class="warnc">↑ Real worst case = MaxTradeRisk × MaxContracts = $600</span>
|
||
├─ Position count OpenPositions ≥ MaxOpenPositions (3) → REJECT
|
||
└─ 80% warning P&L ≤ −$800 → LOG only
|
||
|
||
<b>TIER 2 — AdvancedRiskManager (weekly + drawdown)</b>
|
||
├─ Weekly loss WeeklyPnL ≤ −WeeklyLossLimit → HALT, resets Monday
|
||
├─ Trailing DD TrailingDrawdown ≥ DrawdownLimit → HALT until recovery
|
||
└─ DD 80% DrawdownPct ≥ 0.8 → LOG alert
|
||
|
||
<b>TIER 3 — cross-strategy</b>
|
||
└─ Cross exposure TotalExposure > MaxCrossStrategyExposure → REJECT
|
||
|
||
<b>TIER 3.5 — portfolio heat</b>
|
||
└─ Heat % (TotalOpenRisk + NewTradeRisk) / Equity × 100 → REJECT if > MaxHeatPct (3.0%)
|
||
<span class="okc">↑ this tier DOES include quantity — Tier 1 does not</span>
|
||
|
||
<b>TRAILING DRAWDOWN MONITOR — account-keyed, new 2026-08-18</b>
|
||
├─ equity = Account.Get(AccountItem.NetLiquidation) <span class="warnc">← not yet validated</span>
|
||
├─ peak = max(peak, equity)
|
||
├─ lock-in if peak ≥ AccountStartingBalance + LockOffset (100) → lock
|
||
├─ reference = locked ? lockedPeak : peak
|
||
├─ floor = reference − HaltBuffer (2000)
|
||
└─ <span class="bad">GUARD: EnableTrailingDrawdown=True + AccountStartingBalance=0 → BLOCK ALL ENTRIES</span>
|
||
<span class="bad">↑ 2026-08-18 14:30 onward. 27 rejections. No startup assertion.</span>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- 4 CONFLUENCE -->
|
||
<section id="conf">
|
||
<h2>4 · Confluence scoring — designed weights vs what actually runs</h2>
|
||
<p class="lede">Each factor calculator emits its designed weight. <code>ConfluenceScorer</code>'s constructor pre-populates a weight dictionary with 1.0 for all ten factor types, and <code>ResolveWeight()</code> checks that dictionary first — so the calculators' weights are unreachable dead code. Every <code>STATE:</code> line in production reads <code>x1.00</code>.</p>
|
||
<div class="chart">
|
||
<div class="legend">
|
||
<span><i style="background:var(--s1)"></i>Designed weight (from the factor calculators)</span>
|
||
<span><i style="background:var(--s2)"></i>Actual runtime weight (pre-populated, always 1.00)</span>
|
||
</div>
|
||
<div id="wchart"></div>
|
||
</div>
|
||
|
||
<h3>The same ten factor scores, both ways — live data, 2026-08-18 10:10:11 ET</h3>
|
||
<div class="tiles">
|
||
<div class="tile"><div class="k">Composite — equal weights</div><div class="v" style="color:var(--critical)">0.640</div><div class="d">Grade C · what the system logged</div></div>
|
||
<div class="tile"><div class="k">Composite — designed weights</div><div class="v" style="color:var(--s1)">0.727</div><div class="d">Grade B · one full grade higher</div></div>
|
||
<div class="tile"><div class="k">Total weight</div><div class="v">10.00 <span style="font-size:15px;color:var(--muted)">vs</span> 5.85</div><div class="d">Context factors carry 50% instead of 14.5%</div></div>
|
||
<div class="tile"><div class="k">Grade A reachability</div><div class="v" style="font-size:20px">structurally hard</div><div class="d">Needs all ten factors ≥ 0.80 average; designed scheme reaches A on factors 1–5 alone</div></div>
|
||
</div>
|
||
|
||
<h3>Live factor scores that produced those composites</h3>
|
||
<table>
|
||
<thead><tr><th>#</th><th>Factor</th><th class="num">Score</th><th class="num">Designed wt</th><th class="num">Actual wt</th><th>Reason logged</th></tr></thead>
|
||
<tbody id="ftab"></tbody>
|
||
</table>
|
||
<p class="note">Grade thresholds: A+ ≥ 0.90 · A ≥ 0.80 · B ≥ 0.70 · C ≥ 0.60 · D below · F at floor. The live gate configuration froze <code>MinTradeGrade = 5</code> (Grade A); today's workspace runs <code>MinTradeGrade = 4</code> (Grade B) — itself a drift from the frozen baseline.</p>
|
||
</section>
|
||
|
||
<!-- 5 RUNNER -->
|
||
<section id="runner">
|
||
<h2>5 · Runner economics — why the third contract earns nothing</h2>
|
||
<p class="lede"><strong>Revised in rev B — the diagnosis changed.</strong> The runner is not badly tuned. Its trailing stop is <em>switched off mid-trade</em>. <code>SetStopLoss()</code> and <code>SetTrailStop()</code> are mutually exclusive per signal name in NinjaScript, and the auto-breakeven block calls <code>SetStopLoss()</code> on the runner signal — replacing a live 12-tick trail with a static stop at entry +1. In 4/4 trades the trail was already 12–16 ticks in profit when breakeven fired and was moved <em>backwards</em>.</p>
|
||
<div class="tree">
|
||
<b>AT ENTRY — correct NinjaScript</b>
|
||
SetStopLoss (_runnerSignalName, Ticks, intent.StopTicks) initial protective stop
|
||
<span class="okc">SetTrailStop(_runnerSignalName, Ticks, RunnerTrailTicks=12) ← replaces it with a LIVE 12-tick trail</span>
|
||
EnterLong/EnterShort(runnerQty, _runnerSignalName)
|
||
|
||
<b>IN OnBarUpdate — the defect (NT8StrategyBase.cs ~803)</b>
|
||
if (EnableAutoBreakeven && !_breakevenMoved && profitTicks >= 20)
|
||
<span class="bad">SetStopLoss(_runnerSignalName, Price, entry+1tick) ← DESTROYS THE TRAIL</span>
|
||
|
||
<b>WHAT THAT DOES TO THE STOP</b>
|
||
entry ──────────────────────────────────────────────────────────────────▶ price
|
||
│
|
||
├── <span class="okc">+12..16t where the live 12-tick trail already sat when breakeven fired</span>
|
||
│
|
||
├── <span class="bad">+1t where SetStopLoss moved it ← 11–15 ticks of locked profit given back</span>
|
||
│
|
||
├── +24..28t breakeven actually fires here, not at 20 (Calculate = OnBarClose)
|
||
│
|
||
└── ... <span class="bad">trail is gone. Runner sits static until stopped near entry.</span>
|
||
|
||
<b>THE SOURCE COMMENT FOUR LINES BELOW</b>
|
||
<span class="warnc">"Do NOT call SetTrailStop here — that resets the trail anchor..."</span>
|
||
The author correctly avoided that trap and did not notice that the
|
||
SetStopLoss call above it destroys the trail outright.
|
||
</div>
|
||
<table>
|
||
<thead><tr><th>Trade</th><th class="num">Profit when BE fired</th><th class="num">Where a 12t trail sat</th><th class="num">Where the stop went</th><th class="num">Runner gross</th><th class="num">Runner net</th></tr></thead>
|
||
<tbody>
|
||
<tr><td>2026-08-07</td><td class="num">+28 t</td><td class="num" style="color:var(--s1);font-weight:600">+16 t</td><td class="num" style="color:var(--critical);font-weight:600">+1 t</td><td class="num">$5.00</td><td class="num" style="color:var(--critical)">−$0.76</td></tr>
|
||
<tr><td>2026-08-10</td><td class="num">+25 t</td><td class="num" style="color:var(--s1);font-weight:600">+13 t</td><td class="num" style="color:var(--critical);font-weight:600">+1 t</td><td class="num">$0.00</td><td class="num" style="color:var(--critical)">−$5.76</td></tr>
|
||
<tr><td>2026-08-16</td><td class="num">+24 t</td><td class="num" style="color:var(--s1);font-weight:600">+12 t</td><td class="num" style="color:var(--critical);font-weight:600">+1 t</td><td class="num">$15.00</td><td class="num" style="color:var(--good-text)">+$9.24</td></tr>
|
||
<tr><td>2026-08-17</td><td class="num">+26 t</td><td class="num" style="color:var(--s1);font-weight:600">+14 t</td><td class="num" style="color:var(--critical);font-weight:600">+1 t</td><td class="num">$5.00</td><td class="num" style="color:var(--critical)">−$0.76</td></tr>
|
||
<tr class="total"><td>4 trades</td><td class="num">—</td><td class="num">55 t = $275</td><td class="num">4 t = $20</td><td class="num">$25.00</td><td class="num">+$1.96</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="tiles">
|
||
<div class="tile"><div class="k">Total net P&L</div><div class="v">$1,035.88</div><div class="d">4 broker-confirmed trades, after $69.12 commission</div></div>
|
||
<div class="tile"><div class="k">Runner share of P&L</div><div class="v" style="color:var(--critical)">0.19%</div><div class="d">for 33% of contract exposure</div></div>
|
||
<div class="tile"><div class="k">RTH_ORB trades only</div><div class="v">3</div><div class="d">$758.16 · the 08-16 trade was ETH</div></div>
|
||
<div class="tile"><div class="k">Runner net, RTH only</div><div class="v" style="color:var(--critical)">−$7.28</div><div class="d">on gate-eligible trades, it loses money</div></div>
|
||
<div class="tile"><div class="k">Runner net with a working trail</div><div class="v" style="color:var(--good-text)">≈$252</div><div class="d">conservative floor: exit at the trail's position when BE fired. It ratchets further, so this is a lower bound</div></div>
|
||
<div class="tile"><div class="k">Uplift on realised P&L</div><div class="v" style="color:var(--good-text)">≈24%</div><div class="d">$1,035.88 → ≈$1,286 · from deleting one call site</div></div>
|
||
</div>
|
||
<p class="note"><strong>Two secondary defects in the same block.</strong> <code>entryPrice</code> is <code>Position.AveragePrice</code> — the <em>blended</em> 3-contract average, not the runner's own fill. On 08-16 that produced a breakeven price of <code>30200.08</code>, which is not a valid NQ price (tick 0.25). And because <code>Calculate = OnBarClose</code>, the 20-tick trigger actually fires at 24–28 ticks.<br><br><strong>Consequence for STAGE 2:</strong> the RUNNER-001 sweep must not run until this is fixed. An 18-combination sweep over <em>breakeven trigger × trail distance</em> against a runner whose trail is disabled would return a trail axis with no effect and a confident, meaningless recommendation. Fix first (task <strong>P2-0</strong>), then sweep.</p>
|
||
</section>
|
||
|
||
<!-- 6 COLLISIONS -->
|
||
<section id="collide">
|
||
<h2>6 · Parameter interaction map</h2>
|
||
<p class="lede">Fourteen interactions between parameters that are individually reasonable. Four are actively broken; two of those are stopping trades today.</p>
|
||
<div class="cmap" id="cmap"></div>
|
||
</section>
|
||
|
||
<!-- 7 GAPS -->
|
||
<section id="gaps">
|
||
<h2>7 · Gap register</h2>
|
||
<p class="lede">Colour is severity. GAP-045 through GAP-053 are new in v7.0. Note the numbering caution: <code>GAP-042/043/044</code> mean the repository's definitions; the July audit findings that v6.4 gave those numbers are renamed <code>HIST-41…46</code> to make a third collision impossible.</p>
|
||
<h3>Blocking</h3>
|
||
<div class="gaps" id="g-block"></div>
|
||
<h3>Open — high</h3>
|
||
<div class="gaps" id="g-high"></div>
|
||
<h3>Open — medium and low</h3>
|
||
<div class="gaps" id="g-med"></div>
|
||
<h3>Recently closed</h3>
|
||
<div class="gaps" id="g-done"></div>
|
||
</section>
|
||
|
||
<!-- 8 ROADMAP -->
|
||
<section id="road">
|
||
<h2>8 · Roadmap v7.0 — critical path</h2>
|
||
<p class="lede">Re-sequenced around three principles: unblock before optimising, fix the measuring instrument before measuring, and treat sample rate as a first-class objective. Stage 3's duration is the whole story.</p>
|
||
<div class="road">
|
||
<div class="rstage now"><div class="sn">STAGE 0<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Unblock</span></div><div class="items">P0-A trailing drawdown · P0-A2 startup assertion · P0-B MaxTradeRisk · P0-C reject taxonomy · P0-D commit tree · P0-E re-freeze</div><div class="dur">1–2 days<br><span style="color:var(--muted)">optimistic 1</span></div></div>
|
||
<div class="rstage key"><div class="sn">STAGE 1<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Trustworthy instrument</span></div><div class="items"><strong>P1-A factor weighting ← highest-value item in the project</strong> · P1-B risk envelope · P1-C coherence assertions · P1-D telemetry direction · P1-E gap magnitude · P1-F DaysToLoad · P1-G configdiff as a gate</div><div class="dur">1–2 weeks<br><span style="color:var(--muted)">optimistic 3d</span></div></div>
|
||
<div class="rstage"><div class="sn">STAGE 2<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Runner</span></div><div class="items">P2-A analyzer viability → P2-B 18-combination sweep → P2-C analyse → P2-D superseding decision · <em>depends on P1-F</em></div><div class="dur">1–2 weeks<br><span style="color:var(--muted)">optimistic 2d</span></div></div>
|
||
<div class="rstage"><div class="sn">STAGE 3<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Gate Run #3</span></div><div class="items">≥2 weeks AND ≥20 RTH_ORB trades, single frozen account · outcome matrix decides PASS / CONDITIONAL / MARGINAL / NO EDGE / NEGATIVE / FAIL-on-risk</div><div class="dur" style="color:var(--critical);font-weight:600">2–7 months<br><span style="color:var(--muted);font-weight:400">optimistic 2wk</span></div></div>
|
||
<div class="rstage"><div class="sn">STAGE 4<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Ruling</span></div><div class="items">Gate report · grade-vs-outcome correlation (never measured) · direction split · runner attribution · cost analysis · GAP-007 walk-forward</div><div class="dur">1–2 weeks</div></div>
|
||
<div class="rstage"><div class="sn">STAGE 5<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Live micro</span></div><div class="items">1 MNQ contract · real capital · trailing drawdown properly configured · PF > 1.8, max daily loss < $100</div><div class="dur">6–10 weeks</div></div>
|
||
<div class="rstage"><div class="sn">STAGE 6<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Scale</span></div><div class="items">GAP-042 account dimension (prerequisite) · scale NQ size · LondonORBNT8 · VWAPMeanReversion · overnight gap · GAP-043 bar-type evaluation</div><div class="dur">—</div></div>
|
||
<div class="rstage"><div class="sn">STAGE 7<br><span style="font-weight:400;font-size:11.5px;color:var(--muted)">Platform</span></div><div class="items">External command channel (read side can start in Stage 3) · broker-neutral event schema · web + mobile dashboard · additional broker adapters</div><div class="dur">—</div></div>
|
||
</div>
|
||
<div class="tiles">
|
||
<div class="tile"><div class="k">Trades in the last 6 weeks</div><div class="v">4</div><div class="d">≈0.7 per week</div></div>
|
||
<div class="tile"><div class="k">20-trade sample at that rate</div><div class="v" style="color:var(--critical)">≈7 months</div><div class="d">This is the binding constraint, not the edge</div></div>
|
||
<div class="tile"><div class="k">To first live capital</div><div class="v">4–10 mo</div><div class="d">optimistic ≈11 weeks</div></div>
|
||
<div class="tile"><div class="k">If GAP-047 is the cause</div><div class="v" style="color:var(--good-text)">weeks</div><div class="d">Fixing the weighting could compress Stage 3 from months to weeks</div></div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- 9 TODAY -->
|
||
<section id="today">
|
||
<h2>9 · 2026-08-18 — the day in evidence</h2>
|
||
<p class="lede">Sixteen sessions started. Five valid signals. Zero orders. Two independent blockers, both root-caused, both fixable this week.</p>
|
||
<div class="tl">
|
||
<div class="ev"><div class="t">06:50 / 07:11</div><div class="m">Two strategy instances arm on the <b>same account and instrument</b> (<code>SimSimple ORB</code> / NQ SEP26), both on HFT Algo Bars. Both run until 13:12. <span class="chip warn">single-account doctrine violated</span></div></div>
|
||
<div class="ev"><div class="t">07:11:17</div><div class="m">Session header: <code>DaysToLoad=3</code> on the primary series (configured 120) · <code>WARNING: EnableKillSwitch=False for gate account</code> · factor warm-up SATISFIED, 87 daily bars</div></div>
|
||
<div class="ev"><div class="t">09:30 – 10:00</div><div class="m">Opening range forms: high <b>29,769.75</b>, low <b>29,604.75</b> — a 165-point range</div></div>
|
||
<div class="ev"><div class="t">10:10:11</div><div class="m"><code>STATE: Regime=Bearish Direction=Sell Score=0.640 Grade=C</code> — every factor at <code>x1.00</code>. <code>STATE_CONTEXT: OrbReady=True RecommendedContracts=1</code>. The same block reports <code>GapDirectionAlignment="Large gap −523.25 opposes trade"</code> on a <em>Sell</em> — the telemetry path's direction is stale <span class="chip ser">Finding 5</span></div></div>
|
||
<div class="ev sig"><div class="t">10:10:24.956</div><div class="m"><b>SIGNAL: Sell NQ | LIVE MODE</b> — the real intent passed the grade filter</div></div>
|
||
<div class="ev rej"><div class="t">10:10:24.956</div><div class="m"><b>REJECT: reason=KillSwitch detail=Risk manager rejected: Trade risk too high: $225.00</b><br>45-tick ATR stop × $5.00 = $225.00 > MaxTradeRisk $200.00. <code>MinContracts=1</code> is already the floor; there is nothing to reduce. <span class="chip crit">Blocker A</span></div></div>
|
||
<div class="ev sig"><div class="t">10:10:25 → 10:10:46</div><div class="m">Four more <code>SIGNAL: Sell NQ</code> lines. All rejected. <code>REJECT SUMMARY: reason=KillSwitch count=5</code></div></div>
|
||
<div class="ev"><div class="t">13:19 – 14:23</div><div class="m">Five more sessions started across <b>five different bar periods</b> — HFT Algo, 5 Minute, 15 Minute, 30 Minute, 13 Minute. Nine distinct <code>ConfigHash</code> values and three distinct <code>CodeVersion</code> MVIDs on the day <span class="chip warn">config freeze not in force</span></div></div>
|
||
<div class="ev rej"><div class="t">14:30:00.133</div><div class="m"><b>REJECT: reason=TrailingDrawdownBreach detail=EnableTrailingDrawdown=True but AccountStartingBalance is not configured</b><br>The monitor added today (DEC-20260818-17) correctly refuses to run without a floor — and its refusal blocks every entry for the rest of the session. 27 rejections. <span class="chip crit">Blocker B</span></div></div>
|
||
<div class="ev"><div class="t">16:40</div><div class="m">Last session terminates. <b>Signals: 5 · Submissions: 0 · Fills: 0 · P&L: $0.00</b></div></div>
|
||
</div>
|
||
<p class="note"><strong>What this day proves.</strong> The strategy found a textbook setup — a clean 165-point opening range, a confirmed breakout, a bearish regime, and 4.1× average breakout volume — and could not act on it, twice, for two reasons that have nothing to do with the trading hypothesis. That is the whole argument for Stage 0.</p>
|
||
</section>
|
||
|
||
<!-- 10 SESSION CLOCK -->
|
||
<section id="clock">
|
||
<h2>10 · The 24×5 session clock</h2>
|
||
<p class="lede">24×5 coverage is <strong>concurrent strategy instances with disjoint session windows</strong>, not switching between strategies — settled in <code>architecture.md</code> on 2026-08-17. <code>PortfolioRiskManager</code> was already built for it. A new strategy is a new <code>IStrategy</code> plus a thin NinjaScript subclass; the shared base is not forked. The roadmap names four strategies. It has never had a clock. Here it is.</p>
|
||
<div class="pipe">
|
||
<div class="stage"><div class="n">03:00</div><div><strong>LondonORBNT8</strong> — 03:00–03:30 ET opening range</div><div class="rr">Sprint 4 · named only</div><div class="st"><span class="chip warn">no design</span></div></div>
|
||
<div class="stage sig"><div class="n">09:30</div><div><strong>SimpleORBNT8</strong> — 09:30–10:00 ET opening range</div><div class="rr">under validation</div><div class="st"><span class="chip ok">the one that exists</span></div></div>
|
||
<div class="stage"><div class="n">11:00</div><div><strong>VWAPMeanReversion</strong> — 11:00–14:00 ET</div><div class="rr">Sprint 4 · named only</div><div class="st"><span class="chip warn">no design</span></div></div>
|
||
<div class="stage suspect"><div class="n">15:00</div><div><em>unassigned</em> — closing drive / second RTH ORB</div><div class="rr">not on the roadmap</div><div class="st"><span class="chip ser">gap</span></div></div>
|
||
<div class="stage suspect"><div class="n">18:00</div><div><em>unassigned</em> — Asia-session ORB, the symmetric counterpart to London</div><div class="rr">not on the roadmap</div><div class="st"><span class="chip ser">gap</span></div></div>
|
||
<div class="stage"><div class="n">O/N</div><div><strong>OvernightGapContinuation / OvernightGapReversion</strong> — event-driven</div><div class="rr">Sprint 4 · named only</div><div class="st"><span class="chip warn">no design</span></div></div>
|
||
</div>
|
||
<h3>Prerequisites before any of this starts</h3>
|
||
<table>
|
||
<thead><tr><th>Prerequisite</th><th>Why</th></tr></thead>
|
||
<tbody>
|
||
<tr><td>Stage 5 passed</td><td>Do not multiply an unvalidated edge</td></tr>
|
||
<tr><td><strong>GAP-042</strong> — account dimension in <code>PortfolioRiskManager</code></td><td>The singleton is keyed only by <code>strategyId</code>. Fine for several strategies on <em>one</em> account; unsafe across accounts</td></tr>
|
||
<tr><td><strong>GAP-055</strong> — <code>MaxDailyTrades</code> persistence</td><td>A cap that resets on restart becomes per-strategy-per-restart once several instances run</td></tr>
|
||
<tr><td>A portfolio daily loss limit distinct from the sum of per-strategy limits</td><td>Three strategies at $1,000 each is a $3,000 day. The hook exists; the number has never been set</td></tr>
|
||
<tr><td>Instrument decision (MNQ vs NQ)</td><td>Three strategies on NQ at <code>MinContracts=1</code> is a much blunter instrument than three on MNQ</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<p class="note"><strong>Assessment:</strong> the roadmap covers roughly two thirds of a tradeable 24×5 clock, by name only — no entry hypothesis, no session-window map before this one, no per-strategy design pass. The architecture to support it is genuinely ready and has never been collected. Correctly sequenced behind Stage 5, but the design work is a real outstanding item, not a checkbox.</p>
|
||
</section>
|
||
|
||
<footer>NT8-SDK Visual Pack v7.0 rev B · generated 2026-08-18 · companion to NT8_SDK_Master_Document_v7.0_Complete.docx<br>All figures traced to <code>C:\dev\nt8-sdk</code> and <code>Documents\NinjaTrader 8\log\nt8-sdk</code>. No source code was modified.</footer>
|
||
|
||
</div>
|
||
|
||
<script>
|
||
// theme toggle
|
||
const tt=document.getElementById('tt');
|
||
if(window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches){document.documentElement.dataset.theme='dark';}
|
||
function sync(){tt.textContent=document.documentElement.dataset.theme==='dark'?'Light mode':'Dark mode';}
|
||
tt.onclick=()=>{document.documentElement.dataset.theme=document.documentElement.dataset.theme==='dark'?'light':'dark';sync();};
|
||
sync();
|
||
|
||
// ---- factor data (live, session_20260818_071117.log @ 10:10:11.833)
|
||
const F=[
|
||
{n:1,name:'Setup (ORB validity)',s:1.00,d:1.00,r:'ORB validity from range, candle quality, volume, timing'},
|
||
{n:2,name:'Trend alignment',s:0.30,d:1.00,r:'AVWAP location, slope, confirmation'},
|
||
{n:3,name:'Volatility regime',s:0.70,d:1.00,r:'Volatility suitability from ATR ratio'},
|
||
{n:4,name:'Timing in session',s:1.00,d:1.00,r:'Session timing suitability'},
|
||
{n:5,name:'Execution quality',s:0.80,d:1.00,r:'Recent execution quality suitability'},
|
||
{n:6,name:'Narrow range',s:0.45,d:0.20,r:'Range near avg — no significant contraction'},
|
||
{n:7,name:'ORB vs ATR',s:0.50,d:0.15,r:'No daily bar context available'},
|
||
{n:8,name:'Gap direction',s:0.10,d:0.15,r:'Large gap −523.25 opposes trade — high fade risk'},
|
||
{n:9,name:'Breakout volume',s:0.85,d:0.20,r:'Breakout volume 2.6× avg — strong confirmation'},
|
||
{n:10,name:'Prior-day close',s:0.70,d:0.15,r:'Prior close in lower half — moderate bearish bias'}
|
||
];
|
||
// weight chart
|
||
const W=document.getElementById('wchart');
|
||
const MAX=1.0, PX=380;
|
||
W.innerHTML=F.map(f=>`
|
||
<div class="frow">
|
||
<div class="flabel">${f.n}. ${f.name}</div>
|
||
<div class="fbars">
|
||
<div class="fbar d" style="width:${Math.max(2,f.d/MAX*PX)}px"><span>${f.d.toFixed(2)} designed</span></div>
|
||
<div class="fbar a" style="width:${PX}px"><span>1.00 actual</span></div>
|
||
</div>
|
||
</div>`).join('');
|
||
// factor table
|
||
document.getElementById('ftab').innerHTML=F.map(f=>`
|
||
<tr><td>${f.n}</td><td>${f.name}</td><td class="num">${f.s.toFixed(2)}</td>
|
||
<td class="num">${f.d.toFixed(2)}</td><td class="num" style="color:var(--s2);font-weight:600">1.00</td>
|
||
<td style="font-size:12.5px;color:var(--ink2)">${f.r}</td></tr>`).join('');
|
||
|
||
// ---- collisions
|
||
const C=[
|
||
['crit','1 · MaxTradeRisk × MaxStopTicks × tick value','50 ticks × $5 = $250 > $200. The top 20% of the ATR stop range is unreachable. <b>Blocking trades today.</b>'],
|
||
['crit','9 · EnableTrailingDrawdown × AccountStartingBalance','Enabled without the balance blocks every entry. No startup assertion. <b>Blocking trades today.</b>'],
|
||
['crit','7 · MinTradeGrade × factor weighting','Grade A (0.80) near-unreachable at equal weights. <b>Suppressing signals.</b>'],
|
||
['crit','5 · BreakevenTriggerTicks × dynamic target','Trigger 20 vs target 28 leaves the runner 8 ticks. <b>Costs the runner its entire contribution.</b>'],
|
||
['ser','2 · MaxTradeRisk × MaxContracts × DailyLossLimit','No quantity term in Tier 1 → worst case $600 against a $1,000 daily limit. <b>Under-enforced.</b>'],
|
||
['warn','8 · RegimeGate=GradePenalty × MinTradeGrade','A one-grade penalty on an already-suppressed score. Compounds #7.'],
|
||
['warn','6 · BreakevenOffsetTicks × slippage','1-tick offset means one tick of adverse noise stops the runner flat.'],
|
||
['warn','3 · RiskPerTrade × MinContracts','MinContracts=1 overrides the risk target upward. By design, but undocumented.'],
|
||
['warn','12 · SmaPeriodLong × backtest start date','Regime gate never arms below 50 daily bars. Mandatory 60-day warm-up.'],
|
||
['warn','10 · MaxDailyTrades = 1','Caps daily upside at one trade regardless of setup count. Deliberate for the gate; revisit after.'],
|
||
['warn','11 · EnableDynamicStop × StopTicks / TargetTicks','Static values are overwritten and become misleading in settings exports.'],
|
||
['warn','13 · EnableShortTrendFilter vs the long veto','Shorts are configurably vetoed; longs unconditionally. Undocumented asymmetry.'],
|
||
['warn','14 · Two hardcoded tick-value tables','BasicRiskManager and BasicPositionSizer each carry a copy. Latent divergence.'],
|
||
['ok','4 · RiskPerTrade ≤ MaxTradeRisk','Asserted at startup since GAP-003. Currently 100 ≤ 200 — satisfied.']
|
||
];
|
||
document.getElementById('cmap').innerHTML=C.map(([k,t,b])=>
|
||
`<div class="cell ${k}"><div class="t">${t}</div><div class="b">${b}</div></div>`).join('');
|
||
|
||
// ---- gaps
|
||
function gaps(el,arr,cls){document.getElementById(el).innerHTML=arr.map(([id,txt])=>
|
||
`<div class="gap ${cls}"><div class="id">${id}</div><div class="txt">${txt}</div></div>`).join('');}
|
||
gaps('g-block',[
|
||
['—','Dirty working tree: 17 modified, 5 untracked. Two live strategy files uncommitted'],
|
||
['GAP-054','Auto-breakeven SetStopLoss destroys the runner trailing stop. 4/4 trades. Blocks RUNNER-001'],
|
||
['GAP-045','MaxTradeRisk / MaxStopTicks collision blocks all high-ATR days'],
|
||
['GAP-046','EnableTrailingDrawdown without AccountStartingBalance blocks every entry'],
|
||
['GAP-047','Factor weights pre-populated to 1.0; designed weights unreachable'],
|
||
['GAP-034a','Silent day — no candidate produced (08-03/04/13). GAP-047 is the primary suspect'],
|
||
['GAP-034b','Silent day — candidate blocked at a risk gate. ROOT-CAUSED'],
|
||
['RUNNER-001','Sweep never executed against real exports']
|
||
],'crit');
|
||
gaps('g-high',[
|
||
['GAP-055','MaxDailyTrades does not survive a restart. Breached on CME date 2026-08-17'],
|
||
['GAP-048','Reject taxonomy conflates four causes under KillSwitch'],
|
||
['GAP-049','Telemetry STATE score is direction-incorrect, presented as the trade grade'],
|
||
['GAP-050','MaxTradeRisk has no quantity term; documented formula is wrong'],
|
||
['GAP-044','Primary-series DaysToLoad not respected — blocks all Strategy Analyzer work'],
|
||
['GAP-007','Walk-forward validation — the edge is unproven until this passes'],
|
||
['GAP-025','Runner no-fill anomaly diagnosis — blocks live promotion'],
|
||
['GAP-030','Historical ORB state hydration on a late enable'],
|
||
['GAP-022-F','Injectable connection-state seam — unblocks 3 deferred scenarios']
|
||
],'high');
|
||
gaps('g-med',[
|
||
['GAP-042','PortfolioRiskManager has no account dimension'],
|
||
['GAP-043','HFTAlgoBarsType is third-party with no in-repo fallback'],
|
||
['GAP-051','MicroUpgradeThreshold fires every session at a $49k balance'],
|
||
['GAP-052','Two independent hardcoded tick-value tables'],
|
||
['GAP-053','executive_summary.md and roadmap.md Sprint 3 list are months stale'],
|
||
['GAP-013','ContractRollHandler completion'],
|
||
['GAP-015','Config JSON export / import'],
|
||
['GAP-017','ParameterOptimizer → Strategy Analyzer']
|
||
],'med');
|
||
gaps('g-done',[
|
||
['GAP-035','Rejection reasons to FileLog — working in production'],
|
||
['GAP-036','risk_mode from intent.Metadata'],
|
||
['GAP-037','MaxDailyTrades regression tests'],
|
||
['GAP-038','ConfigHash includes BarsPeriod — verified: 5 bar types → 5 hashes'],
|
||
['GAP-039','_dailyTradeCount realtime-only'],
|
||
['GAP-040','Startup warnings for bar type and DaysToLoad — firing today'],
|
||
['GAP-031/032/033','Provenance, MaxDailyTrades, session readiness — closed 08-03'],
|
||
['GAP-001…011,019,022,024,029','Sprint 2 / 2.7 — closed July']
|
||
],'done');
|
||
</script>
|
||
</body>
|
||
</html>
|