Fix daily target dropping below minDayPnL after min days met

Math.max(baseAmount, effectiveMinDay) ensures the floor is always
enforced when minDayPnL > 0, not just inside the min-day reservation block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-04-02 17:18:39 -05:00
co-authored by Claude Opus 4.6
parent 7afc5b9437
commit 58628e0ce1
+1 -1
View File
@@ -146,5 +146,5 @@ export function computeDailyTarget(
baseAmount = Math.max(0, profitTarget - totalProfit);
}
return { amount: Math.round(baseAmount * 100) / 100, path };
return { amount: Math.round(Math.max(baseAmount, effectiveMinDay) * 100) / 100, path };
}