Report DLL-locked accounts as finished at a loss
An account Tradovate flips to liquidate-only at the daily loss limit is done for the day, but the reporter only counted a loss when the booked realizedPnL was already negative — so a locked-out account whose P&L hadn't caught up (or that had no matching config) showed as still to trade. Count inactive accounts as traded at a loss. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
5d2f4d607a
commit
0d01539338
@@ -88,6 +88,17 @@ function collectFirmStats() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// DLL lockout: Tradovate flips the account to liquidate-only, so
|
||||
// its day is over at a loss even when the booked realizedPnL
|
||||
// hasn't caught up yet (or the account has no matching config).
|
||||
if (!acc.active) {
|
||||
accountsTraded++;
|
||||
slice.accountsTraded++;
|
||||
lossCount++;
|
||||
slice.loss = (slice.loss ?? 0) + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if target was hit today
|
||||
if (cfg) {
|
||||
// Same combined-day view as the trade path: for a combining
|
||||
|
||||
Reference in New Issue
Block a user