hedgequantx 1.2.104 → 1.2.106
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/algo.js +22 -4
package/package.json
CHANGED
package/src/pages/algo.js
CHANGED
|
@@ -404,12 +404,29 @@ const selectSymbolMenu = async (service, account) => {
|
|
|
404
404
|
}
|
|
405
405
|
]);
|
|
406
406
|
|
|
407
|
+
// Privacy option - show or hide account name
|
|
408
|
+
console.log();
|
|
409
|
+
const { showAccountName } = await inquirer.prompt([
|
|
410
|
+
{
|
|
411
|
+
type: 'list',
|
|
412
|
+
name: 'showAccountName',
|
|
413
|
+
message: chalk.white.bold('Account name visibility:'),
|
|
414
|
+
choices: [
|
|
415
|
+
{ name: chalk.cyan('[>] Show account name'), value: true },
|
|
416
|
+
{ name: chalk.gray('[.] Hide account name'), value: false }
|
|
417
|
+
],
|
|
418
|
+
loop: false
|
|
419
|
+
}
|
|
420
|
+
]);
|
|
421
|
+
|
|
422
|
+
const displayAccountName = showAccountName ? accountName : 'HQX *****';
|
|
423
|
+
|
|
407
424
|
// Confirmation
|
|
408
425
|
console.log();
|
|
409
426
|
console.log(chalk.gray(getSeparator()));
|
|
410
427
|
console.log(chalk.white.bold(' Algo Configuration:'));
|
|
411
428
|
console.log(chalk.gray(getSeparator()));
|
|
412
|
-
console.log(chalk.white(` Account: ${chalk.cyan(
|
|
429
|
+
console.log(chalk.white(` Account: ${chalk.cyan(displayAccountName)}`));
|
|
413
430
|
console.log(chalk.white(` Symbol: ${chalk.cyan(contract.name || selectedSymbol.value)}`));
|
|
414
431
|
console.log(chalk.white(` Contracts: ${chalk.cyan(contracts)}`));
|
|
415
432
|
console.log(chalk.white(` Daily Target: ${chalk.green('$' + dailyTarget.toFixed(2))}`));
|
|
@@ -434,14 +451,15 @@ const selectSymbolMenu = async (service, account) => {
|
|
|
434
451
|
return;
|
|
435
452
|
}
|
|
436
453
|
|
|
437
|
-
await launchAlgo(service, account, contract, contracts, dailyTarget, maxRisk);
|
|
454
|
+
await launchAlgo(service, account, contract, contracts, dailyTarget, maxRisk, showAccountName);
|
|
438
455
|
};
|
|
439
456
|
|
|
440
457
|
/**
|
|
441
458
|
* Launch Algo with HQX Server Connection
|
|
442
459
|
*/
|
|
443
|
-
const launchAlgo = async (service, account, contract, numContracts, dailyTarget, maxRisk) => {
|
|
444
|
-
const
|
|
460
|
+
const launchAlgo = async (service, account, contract, numContracts, dailyTarget, maxRisk, showAccountName = true) => {
|
|
461
|
+
const realAccountName = account.accountName || account.name || 'Account #' + account.accountId;
|
|
462
|
+
const accountName = showAccountName ? realAccountName : 'HQX *****';
|
|
445
463
|
const symbolName = contract.name || contract.symbol || contract.id;
|
|
446
464
|
const symbol = contract.symbol || contract.id;
|
|
447
465
|
|