hedgequantx 2.5.31 → 2.5.32
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 +11 -5
package/package.json
CHANGED
package/src/pages/stats.js
CHANGED
|
@@ -426,11 +426,17 @@ const showStats = async (service) => {
|
|
|
426
426
|
const supervisedAccounts = supervisionData.totalAccounts;
|
|
427
427
|
const supervisedPnL = supervisionData.totalPnL;
|
|
428
428
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
429
|
+
// Calculate max agent name length to fit in column (label=18 + space=1 + padding buffer)
|
|
430
|
+
const maxAgentNameLen = col1 - 20;
|
|
431
|
+
const agentNamesDisplay = agentNames.length > maxAgentNameLen
|
|
432
|
+
? agentNames.substring(0, maxAgentNameLen - 2) + '..'
|
|
433
|
+
: agentNames;
|
|
434
|
+
|
|
435
|
+
console.log(chalk.cyan('\u2551') + fmtRow('CONNECTED AGENTS:', chalk.green(String(aiAgents.length)), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED ACCOUNTS:', chalk.white(String(supervisedAccounts)), col2) + chalk.cyan('\u2551'));
|
|
436
|
+
console.log(chalk.cyan('\u2551') + fmtRow('MODE:', modeColor(agentMode), col1) + chalk.cyan('\u2502') + fmtRow('SUPERVISED P&L:', supervisedPnL >= 0 ? chalk.green('$' + supervisedPnL.toFixed(2)) : chalk.red('$' + supervisedPnL.toFixed(2)), col2) + chalk.cyan('\u2551'));
|
|
437
|
+
console.log(chalk.cyan('\u2551') + fmtRow('ACTIVE:', activeAgent ? chalk.green(activeAgent.name) : chalk.white('NONE'), col1) + chalk.cyan('\u2502') + fmtRow('POSITIONS:', chalk.white(String(supervisionData.totalPositions)), col2) + chalk.cyan('\u2551'));
|
|
438
|
+
console.log(chalk.cyan('\u2551') + fmtRow('SESSION TIME:', sessionTimeStr === 'INACTIVE' ? chalk.yellow(sessionTimeStr) : chalk.white(sessionTimeStr), col1) + chalk.cyan('\u2502') + fmtRow('OPEN ORDERS:', chalk.white(String(supervisionData.totalOrders)), col2) + chalk.cyan('\u2551'));
|
|
439
|
+
console.log(chalk.cyan('\u2551') + fmtRow('AGENTS:', chalk.white(agentNamesDisplay), col1) + chalk.cyan('\u2502') + fmtRow('TRADES TODAY:', chalk.white(String(supervisionData.totalTrades)), col2) + chalk.cyan('\u2551'));
|
|
434
440
|
|
|
435
441
|
drawBoxFooter(boxWidth);
|
|
436
442
|
}
|