Target profitTarget in addition to consistency realTarget
computeDailyTarget was only solving for consistency (realTarget = maxDay / consistency). When realTarget < profitTarget, the function would stop trading before hitting the actual profit goal. Now uses Math.max(realTarget, profitTarget) - totalProfit as the remaining needed, capped at maxDay for the daily target. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c3ec477c50
commit
c63be0d3e2
@@ -105,7 +105,8 @@ export function computeDailyTarget(
|
||||
} else {
|
||||
const maxDay = Math.max(...qualifyingDays.map((d) => d.pnl));
|
||||
const realTarget = maxDay / consistency;
|
||||
const needed = realTarget - totalProfit;
|
||||
// Need to satisfy BOTH consistency (realTarget) AND the actual profitTarget
|
||||
const needed = Math.max(realTarget, profitTarget) - totalProfit;
|
||||
|
||||
if (needed > maxDay) {
|
||||
baseAmount = maxDay;
|
||||
|
||||
Reference in New Issue
Block a user