hedgequantx 2.7.8 → 2.7.10
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
CHANGED
package/src/pages/stats/chart.js
CHANGED
|
@@ -60,9 +60,7 @@ const renderEquityCurve = (data) => {
|
|
|
60
60
|
});
|
|
61
61
|
} else {
|
|
62
62
|
// No trade data message
|
|
63
|
-
const msg =
|
|
64
|
-
? ' No trade history (Rithmic does not provide trade history API)'
|
|
65
|
-
: ' No trade data available';
|
|
63
|
+
const msg = ' No trades found';
|
|
66
64
|
console.log(chalk.cyan('\u2551') + chalk.gray(msg) + ' '.repeat(Math.max(0, chartInnerWidth - msg.length)) + chalk.cyan('\u2551'));
|
|
67
65
|
}
|
|
68
66
|
|
|
@@ -36,13 +36,13 @@ const renderOverview = (data) => {
|
|
|
36
36
|
drawBoxHeader('HQX STATS', boxWidth);
|
|
37
37
|
draw2ColHeader('ACCOUNT OVERVIEW', 'TRADING PERFORMANCE', boxWidth);
|
|
38
38
|
|
|
39
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
40
|
-
console.log(chalk.cyan('\u2551') + fmtRow('Total
|
|
41
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
42
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
43
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
44
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
45
|
-
console.log(chalk.cyan('\u2551') + fmtRow('
|
|
39
|
+
console.log(chalk.cyan('\u2551') + fmtRow('Total Accounts:', chalk.cyan(String(activeAccounts.length)), col1) + chalk.cyan('\u2502') + fmtRow('Total Trades:', hasTradeData || stats.totalTrades > 0 ? chalk.white(String(stats.totalTrades)) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
40
|
+
console.log(chalk.cyan('\u2551') + fmtRow('Total Balance:', totalBalanceColor(balanceStr), col1) + chalk.cyan('\u2502') + fmtRow('Winning Trades:', hasTradeData || stats.winningTrades > 0 ? chalk.green(String(stats.winningTrades)) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
41
|
+
console.log(chalk.cyan('\u2551') + fmtRow('Starting Balance:', chalk.white(startBalStr), col1) + chalk.cyan('\u2502') + fmtRow('Losing Trades:', hasTradeData || stats.losingTrades > 0 ? chalk.red(String(stats.losingTrades)) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
42
|
+
console.log(chalk.cyan('\u2551') + fmtRow('Total P&L:', pnlColor(pnlStr), col1) + chalk.cyan('\u2502') + fmtRow('Win Rate:', metrics.winRate !== 'N/A' ? (parseFloat(metrics.winRate) >= 50 ? chalk.green(metrics.winRate + '%') : chalk.yellow(metrics.winRate + '%')) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
43
|
+
console.log(chalk.cyan('\u2551') + fmtRow('', '', col1) + chalk.cyan('\u2502') + fmtRow('Long Trades:', hasTradeData ? chalk.white(stats.longTrades + (metrics.longWinRate !== 'N/A' ? ' (' + metrics.longWinRate + '%)' : '')) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
44
|
+
console.log(chalk.cyan('\u2551') + fmtRow('', '', col1) + chalk.cyan('\u2502') + fmtRow('Short Trades:', hasTradeData ? chalk.white(stats.shortTrades + (metrics.shortWinRate !== 'N/A' ? ' (' + metrics.shortWinRate + '%)' : '')) : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
45
|
+
console.log(chalk.cyan('\u2551') + fmtRow('', '', col1) + chalk.cyan('\u2502') + fmtRow('Volume:', hasTradeData ? chalk.white(stats.totalVolume + ' contracts') : chalk.gray('N/A'), col2) + chalk.cyan('\u2551'));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -161,7 +161,7 @@ const renderTradesHistory = (data) => {
|
|
|
161
161
|
console.log(chalk.cyan('\u2551') + moreMsg.padEnd(innerWidth) + chalk.cyan('\u2551'));
|
|
162
162
|
}
|
|
163
163
|
} else {
|
|
164
|
-
const msg = ' No
|
|
164
|
+
const msg = ' No trades found';
|
|
165
165
|
console.log(chalk.cyan('\u2551') + chalk.gray(msg.padEnd(innerWidth)) + chalk.cyan('\u2551'));
|
|
166
166
|
}
|
|
167
167
|
|