hedgequantx 2.6.54 → 2.6.56

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.6.54",
3
+ "version": "2.6.56",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -440,25 +440,19 @@ class CopyEngine {
440
440
 
441
441
  this.pollCount++;
442
442
 
443
- // Smart logs every second - non-repetitive status updates
443
+ // Smart logs - only on STATE CHANGES (not every second when in position)
444
444
  const now = Date.now();
445
445
  if (now - this.lastLogTime > 1000) {
446
446
  const smartLogs = require('./smart-logs');
447
447
 
448
- if (this.leadPositions.size > 0) {
449
- // In position - show position status
450
- for (const [key, pos] of this.leadPositions) {
451
- const side = pos.quantity > 0 ? 'LONG' : 'SHORT';
452
- const unrealizedPnl = pos.profitAndLoss || 0;
453
- const holdTime = Math.floor((now - (this.positionEntryTime || now)) / 1000);
454
- const posLog = smartLogs.getPositionUpdateLog(side, Math.abs(pos.quantity), unrealizedPnl, pos.averagePrice || 0, pos.averagePrice || 0, holdTime);
455
- algoLogger.trade(this.ui, posLog.message, posLog.details);
456
- }
457
- } else {
458
- // No position - show scanning status
448
+ if (this.leadPositions.size === 0) {
449
+ // Not in position - show market analysis (varied messages)
450
+ // Use scanning log since copy trading doesn't have strategy model values
459
451
  const scanLog = smartLogs.getScanningLog(true);
460
- algoLogger.info(this.ui, scanLog.message, `poll #${this.pollCount} | ${pollTime}ms`);
452
+ this.ui.addLog('info', `${scanLog.message} poll #${this.pollCount} | ${pollTime}ms`);
461
453
  }
454
+ // When IN POSITION: Don't spam logs every second
455
+ // Position updates come from order fills and exit events (copyPositionOpen/copyPositionClose)
462
456
  this.lastLogTime = now;
463
457
  }
464
458
 
@@ -1033,8 +1033,7 @@ const launchAlgo = async (service, account, contract, config) => {
1033
1033
  // Summary
1034
1034
  renderSessionSummary(stats, stopReason);
1035
1035
 
1036
- console.log('\n RETURNING TO MENU IN 3 SECONDS...');
1037
- await new Promise(resolve => setTimeout(resolve, 3000));
1036
+ await prompts.waitForEnter();
1038
1037
  };
1039
1038
 
1040
1039
  module.exports = { oneAccountMenu };