From c493796602d4d075f816dfb395f44755a0bfc194 Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Sat, 12 Sep 2026 18:12:12 -0500 Subject: [PATCH] =?UTF-8?q?Drain-day=20randomness=20in=20$0.50=20steps=20(?= =?UTF-8?q?MNQ=20tick=20value),=20$5.00=E2=80=93$15.00?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- lib/trading-logic.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/trading-logic.ts b/lib/trading-logic.ts index 3be3bdd..eefdfdc 100644 --- a/lib/trading-logic.ts +++ b/lib/trading-logic.ts @@ -133,9 +133,10 @@ export function currentTradeDateCT(now: Date = new Date()): string { /** * Drain-day target: the stage's min-day amount plus a deterministic bump of - * $0/$5/$10 — so a $5 min day trades as $5, $10 or $15 depending on the - * (account, trade date) pair. Seeded like dailyBump so every consumer of the - * plan computes the same number. + * $0–$10 in $0.50 steps — MNQ's per-contract tick value, so every possible + * target lands on a realizable exit ($5 min day → $5.00, $5.50, … $15.00 + * depending on the (account, trade date) pair). Seeded like dailyBump so + * every consumer of the plan computes the same number. */ export function drainDayAmount(accountId: number, tradeDate: string, minDay: number): number { const key = `${accountId}|drain|${tradeDate}`; @@ -144,7 +145,7 @@ export function drainDayAmount(accountId: number, tradeDate: string, minDay: num hash ^= key.charCodeAt(i); hash = Math.imul(hash, 0x01000193) >>> 0; } - return minDay + (hash % 3) * 5; + return round2(minDay + (hash % 21) * 0.5); } /**