hedgequantx 2.4.28 → 2.4.30
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/menus/dashboard.js
CHANGED
|
@@ -63,8 +63,8 @@ const dashboardMenu = async (service) => {
|
|
|
63
63
|
// Yellow icons: ✔ for each stat
|
|
64
64
|
const icon = chalk.yellow('✔ ');
|
|
65
65
|
const statsPlain = `✔ Connections: ${statsInfo.connections} ✔ Accounts: ${statsInfo.accounts} ✔ Balance: ${balStr} ✔ P&L: ${pnlDisplay}`;
|
|
66
|
-
const statsLeftPad = Math.floor((W - statsPlain.length) / 2);
|
|
67
|
-
const statsRightPad = W - statsPlain.length - statsLeftPad;
|
|
66
|
+
const statsLeftPad = Math.max(0, Math.floor((W - statsPlain.length) / 2));
|
|
67
|
+
const statsRightPad = Math.max(0, W - statsPlain.length - statsLeftPad);
|
|
68
68
|
|
|
69
69
|
console.log(chalk.cyan('║') + ' '.repeat(statsLeftPad) +
|
|
70
70
|
icon + chalk.white(`Connections: ${statsInfo.connections}`) + ' ' +
|
|
@@ -155,6 +155,11 @@ const configureAlgo = async (account, contract) => {
|
|
|
155
155
|
const confirm = await prompts.confirmPrompt('Start algo trading?', true);
|
|
156
156
|
if (!confirm) return null;
|
|
157
157
|
|
|
158
|
+
// Show spinner while initializing
|
|
159
|
+
const initSpinner = ora({ text: 'Initializing algo trading...', color: 'yellow' }).start();
|
|
160
|
+
await new Promise(r => setTimeout(r, 500));
|
|
161
|
+
initSpinner.succeed('Launching algo...');
|
|
162
|
+
|
|
158
163
|
return { contracts, dailyTarget, maxRisk, showName };
|
|
159
164
|
};
|
|
160
165
|
|
|
@@ -293,7 +298,8 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
293
298
|
|
|
294
299
|
// Log every 100th tick to show activity
|
|
295
300
|
if (tickCount % 100 === 0) {
|
|
296
|
-
|
|
301
|
+
const displayPrice = tick.price || tick.bid || tick.ask;
|
|
302
|
+
ui.addLog('info', `TICK #${tickCount} @ ${displayPrice?.toFixed(2) || '--'}`);
|
|
297
303
|
}
|
|
298
304
|
});
|
|
299
305
|
|