hedgequantx 2.9.105 → 2.9.107

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.105",
3
+ "version": "2.9.107",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -495,8 +495,15 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
495
495
  const h = Math.floor(durationMs / 3600000), m = Math.floor((durationMs % 3600000) / 60000), s = Math.floor((durationMs % 60000) / 1000);
496
496
  stats.duration = h > 0 ? `${h}h ${m}m ${s}s` : m > 0 ? `${m}m ${s}s` : `${s}s`;
497
497
  renderSessionSummary(stats, stopReason);
498
- console.log('\n Returning to menu in 3 seconds...');
499
- await new Promise(resolve => setTimeout(resolve, 3000));
498
+
499
+ const readline = require('readline');
500
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
501
+ await new Promise(resolve => {
502
+ rl.question('\n Press Enter to return to menu...', () => {
503
+ rl.close();
504
+ resolve();
505
+ });
506
+ });
500
507
  };
501
508
 
502
509
  module.exports = { executeAlgo };
@@ -255,8 +255,14 @@ const launchCopyTrading = async (config) => {
255
255
 
256
256
  renderSessionSummary(stats, stopReason);
257
257
 
258
- console.log('\n Returning to menu in 3 seconds...');
259
- await new Promise(resolve => setTimeout(resolve, 3000));
258
+ const readline = require('readline');
259
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
260
+ await new Promise(resolve => {
261
+ rl.question('\n Press Enter to return to menu...', () => {
262
+ rl.close();
263
+ resolve();
264
+ });
265
+ });
260
266
  };
261
267
 
262
268
  /**
@@ -233,6 +233,12 @@ const oneAccountMenu = async (service) => {
233
233
  const proceed = await prompts.confirmPrompt(startPrompt, true);
234
234
  if (!proceed) return;
235
235
 
236
+ const startSpinner = ora({ text: 'Initializing algo trading...', color: 'cyan' }).start();
237
+
238
+ // Small delay to show spinner then stop before executeAlgo takes over the screen
239
+ await new Promise(resolve => setTimeout(resolve, 500));
240
+ startSpinner.succeed('Algo initialized');
241
+
236
242
  await executeAlgo({
237
243
  service: accountService,
238
244
  account: selectedAccount,