hedgequantx 2.5.39 → 2.5.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/pages/stats.js +10 -3
- package/src/services/ai/strategy-supervisor.js +1200 -45
package/package.json
CHANGED
package/src/pages/stats.js
CHANGED
|
@@ -608,12 +608,19 @@ const showStats = async (service) => {
|
|
|
608
608
|
// Empty line
|
|
609
609
|
console.log(chalk.cyan('\u2551') + ' '.repeat(behaviorInnerWidth) + chalk.cyan('\u2551'));
|
|
610
610
|
|
|
611
|
-
//
|
|
612
|
-
const
|
|
613
|
-
const statsLine = ` CURRENT: ${barColors[currentAction](currentAction)} | PATTERNS: ${learningStats.patternsLearned.total} (${learningStats.patternsLearned.winning}W/${learningStats.patternsLearned.losing}L) | OPTIMIZATIONS: ${learningStats.optimizations}`;
|
|
611
|
+
// Current session stats line
|
|
612
|
+
const statsLine = ` CURRENT: ${barColors[currentAction](currentAction)} | SESSION PATTERNS: ${learningStats.patternsLearned.total} (${learningStats.patternsLearned.winning}W/${learningStats.patternsLearned.losing}L) | OPTIMIZATIONS: ${learningStats.optimizations}`;
|
|
614
613
|
const statsLen = statsLine.replace(/\x1b\[[0-9;]*m/g, '').length;
|
|
615
614
|
console.log(chalk.cyan('\u2551') + statsLine + ' '.repeat(Math.max(0, behaviorInnerWidth - statsLen)) + chalk.cyan('\u2551'));
|
|
616
615
|
|
|
616
|
+
// Lifetime stats line (memory across sessions)
|
|
617
|
+
const lifetimeStats = StrategySupervisor.getLifetimeStats();
|
|
618
|
+
if (lifetimeStats.totalSessions > 0) {
|
|
619
|
+
const lifetimeLine = ` LIFETIME: ${lifetimeStats.totalSessions} sessions | ${lifetimeStats.totalTrades} trades | WR: ${lifetimeStats.lifetimeWinRate} | P&L: $${lifetimeStats.lifetimePnL.toFixed(2)} | ${lifetimeStats.patternsLearned.winning + lifetimeStats.patternsLearned.losing} patterns learned`;
|
|
620
|
+
const lifetimeLen = lifetimeLine.length;
|
|
621
|
+
console.log(chalk.cyan('\u2551') + chalk.magenta(lifetimeLine) + ' '.repeat(Math.max(0, behaviorInnerWidth - lifetimeLen)) + chalk.cyan('\u2551'));
|
|
622
|
+
}
|
|
623
|
+
|
|
617
624
|
drawBoxFooter(boxWidth);
|
|
618
625
|
}
|
|
619
626
|
|