From c3ec477c50f466aab5c086f7177372bd153eeb0d Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Mon, 20 Apr 2026 16:59:22 -0500 Subject: [PATCH] Treat Manual Adjustment cash changes as fund transactions Some firms record withdrawals as "Manual Adjustment" instead of "Fund Transaction" in the Cash History. Include both types so the withdrawal-aware cycle filtering still works. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/tradovate-class.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tradovate-class.ts b/lib/tradovate-class.ts index 03e5540..df72272 100644 --- a/lib/tradovate-class.ts +++ b/lib/tradovate-class.ts @@ -523,7 +523,8 @@ export class TradovateClient { const fundTimestampMap: { [date: string]: string } = {}; const dailyMap: { [date: string]: number } = {}; for (const row of rows) { - if ((row['Cash Change Type'] ?? '').trim() === 'Fund Transaction') { + const changeType = (row['Cash Change Type'] ?? '').trim(); + if (changeType === 'Fund Transaction' || changeType === 'Manual Adjustment') { const delta = parseFloat((row['Delta'] ?? '0').replace(/,/g, '')); if (!isNaN(delta)) { fundMap[row['Date']] = (fundMap[row['Date']] ?? 0) + delta;