diff --git a/lib/trading-logic.ts b/lib/trading-logic.ts index c5bcd33..280f452 100644 --- a/lib/trading-logic.ts +++ b/lib/trading-logic.ts @@ -19,12 +19,10 @@ export function resolveEffectiveConfig( fundTransactions: { date: string; amount: number }[] ): { profitTarget: number; consistency: number; minTradingDays: number } { if (targetSameEquity) { - // Withdrawals reduce the profit remaining in the account - const totalWithdrawals = fundTransactions - .filter((f) => f.amount < 0) - .reduce((s, f) => s + f.amount, 0); // negative sum - const remainingProfit = priorProfit + totalWithdrawals; - return { profitTarget: Math.max(0, profitTarget - remainingProfit), consistency, minTradingDays }; + // Simple Mode A: effective target = profitTarget - equityProfit, computed in computeDailyTarget. + // Since computeDailyTarget already compares (amount - accountSize) against profitTarget, + // no adjustment needed here — just return the base values. + return { profitTarget, consistency, minTradingDays }; } if (withdrawalStages.length > 0) { const withdrawalCount = fundTransactions.filter((f) => f.amount < 0).length;