hedgequantx 2.6.61 → 2.6.62

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.61",
3
+ "version": "2.6.62",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -321,7 +321,8 @@ const launchAlgo = async (service, account, contract, config) => {
321
321
  stats.entryLatencies.push(fillLatencyMs);
322
322
  stats.avgFillLatency = stats.entryLatencies.reduce((a, b) => a + b, 0) / stats.entryLatencies.length;
323
323
  const side = position.side === 0 ? 'LONG' : 'SHORT';
324
- algoLogger.info(ui, 'FILLED', `${side} ${position.size}x ${symbolName} @ ${position.entryPrice} | ${fillLatencyMs}ms`);
324
+ // Use 'filled' type for colored FILL icon
325
+ ui.addLog('filled', `${side} ${position.size}x ${symbolName} @ ${position.entryPrice} | ${fillLatencyMs}ms`);
325
326
  });
326
327
 
327
328
  positionManager.on('exitFilled', ({ orderTag, exitPrice, pnlTicks, holdDurationMs }) => {
@@ -332,19 +333,21 @@ const launchAlgo = async (service, account, contract, config) => {
332
333
  stats.sessionPnl += pnlDollars; // Track session P&L
333
334
  if (pnlDollars >= 0) {
334
335
  stats.wins++;
335
- algoLogger.info(ui, 'WIN', `+$${pnlDollars.toFixed(2)} @ ${exitPrice} | ${holdSec}s`);
336
+ // Use 'win' type for green WIN icon
337
+ ui.addLog('win', `+$${pnlDollars.toFixed(2)} @ ${exitPrice} | ${holdSec}s`);
336
338
  } else {
337
339
  stats.losses++;
338
- algoLogger.info(ui, 'LOSS', `-$${Math.abs(pnlDollars).toFixed(2)} @ ${exitPrice} | ${holdSec}s`);
340
+ // Use 'loss' type for red LOSS icon
341
+ ui.addLog('loss', `-$${Math.abs(pnlDollars).toFixed(2)} @ ${exitPrice} | ${holdSec}s`);
339
342
  }
340
343
  } else {
341
344
  // Log with ticks only if tickValue unavailable
342
345
  if (pnlTicks !== null && pnlTicks >= 0) {
343
346
  stats.wins++;
344
- algoLogger.info(ui, 'WIN', `+${pnlTicks} ticks | ${holdSec}s`);
347
+ ui.addLog('win', `+${pnlTicks} ticks | ${holdSec}s`);
345
348
  } else if (pnlTicks !== null) {
346
349
  stats.losses++;
347
- algoLogger.info(ui, 'LOSS', `${pnlTicks} ticks | ${holdSec}s`);
350
+ ui.addLog('loss', `${pnlTicks} ticks | ${holdSec}s`);
348
351
  }
349
352
  }
350
353
  stats.trades++;
@@ -354,11 +357,13 @@ const launchAlgo = async (service, account, contract, config) => {
354
357
  });
355
358
 
356
359
  positionManager.on('holdComplete', ({ orderTag, position }) => {
357
- algoLogger.info(ui, 'READY', `Hold complete - monitoring exit`);
360
+ // Use 'ready' type for green READY icon
361
+ ui.addLog('ready', `Hold complete - monitoring exit`);
358
362
  });
359
363
 
360
364
  positionManager.on('breakevenActivated', ({ orderTag, position, breakevenPrice, pnlTicks }) => {
361
- algoLogger.info(ui, 'BE', `Breakeven activated @ ${breakevenPrice} | +${pnlTicks} ticks`);
365
+ // Use 'be' type for yellow BE icon
366
+ ui.addLog('be', `Breakeven @ ${breakevenPrice} | +${pnlTicks} ticks`)
362
367
  });
363
368
 
364
369
  positionManager.on('exitOrderFired', ({ orderTag, exitReason, latencyMs }) => {
@@ -554,8 +559,8 @@ const launchAlgo = async (service, account, contract, config) => {
554
559
  orderData.accountId = account.rithmicAccountId;
555
560
  }
556
561
 
557
- // Log entry attempt (single line)
558
- algoLogger.info(ui, 'ENTRY', `${sideStr} ${contracts}x ${symbolName} | risk: $${riskAmount} (${riskPct}%)`);
562
+ // Log entry attempt (single line) - use 'entry' type for cyan ENTRY icon
563
+ ui.addLog('entry', `${sideStr} ${contracts}x ${symbolName} | risk: $${riskAmount} (${riskPct}%)`);
559
564
 
560
565
  // Fire-and-forget entry (no await on fill)
561
566
  const entryResult = service.fastEntry(orderData);
@@ -19,16 +19,21 @@ const SPINNER = ['\u280B', '\u2819', '\u2839', '\u2838', '\u283C', '\u2834', '\u
19
19
  const LOG_COLORS = {
20
20
  fill_buy: chalk.green,
21
21
  fill_sell: chalk.red,
22
- fill_win: chalk.green.bold,
23
- fill_loss: chalk.red.bold,
22
+ fill_win: chalk.green,
23
+ fill_loss: chalk.red,
24
+ win: chalk.green,
25
+ loss: chalk.red,
26
+ be: chalk.yellow,
27
+ entry: chalk.cyan,
28
+ filled: chalk.green,
24
29
  connected: chalk.cyan,
25
30
  ready: chalk.green,
26
31
  error: chalk.red,
27
32
  reject: chalk.red,
28
- info: chalk.cyan,
33
+ info: chalk.white,
29
34
  system: chalk.magenta,
30
- signal: chalk.yellow.bold,
31
- trade: chalk.green.bold,
35
+ signal: chalk.yellow,
36
+ trade: chalk.green,
32
37
  warning: chalk.yellow,
33
38
  success: chalk.green,
34
39
  analysis: chalk.magenta
@@ -40,6 +45,11 @@ const LOG_ICONS = {
40
45
  fill_sell: 'SELL ',
41
46
  fill_win: 'WIN ',
42
47
  fill_loss: 'LOSS ',
48
+ win: 'WIN ',
49
+ loss: 'LOSS ',
50
+ be: 'BE ',
51
+ entry: 'ENTRY ',
52
+ filled: 'FILL ',
43
53
  connected: 'CONN ',
44
54
  ready: 'READY ',
45
55
  error: 'ERR ',