hedgequantx 2.6.76 → 2.6.77

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.76",
3
+ "version": "2.6.77",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -981,8 +981,8 @@ const launchAlgo = async (service, account, contract, config) => {
981
981
  };
982
982
 
983
983
  // Start polling and UI refresh
984
- // UI refreshes every 250ms, P&L polling every 10s (WebSocket is primary for P&L)
985
- const refreshInterval = setInterval(() => { if (running) ui.render(stats); }, 250);
984
+ // UI refreshes every 500ms (reduced from 250ms to prevent flicker), P&L polling every 10s
985
+ const refreshInterval = setInterval(() => { if (running) ui.render(stats); }, 500);
986
986
  const pnlInterval = setInterval(() => { if (running) pollPnL(); }, 10000);
987
987
  pollPnL(); // Initial poll
988
988
 
@@ -382,18 +382,22 @@ class AlgoUI {
382
382
  this.buffer = '';
383
383
 
384
384
  if (this.firstDraw) {
385
+ // Enter alternate screen, hide cursor, clear
385
386
  this.buffer += '\x1B[?1049h\x1B[?25l\x1B[2J';
386
387
  this.firstDraw = false;
387
388
  }
388
389
 
390
+ // Move cursor to home position (no clear - reduces flicker)
389
391
  this.buffer += '\x1B[H';
390
392
  this._line('');
391
393
  this._drawHeader();
392
394
  this._drawStats(stats);
393
395
  this._drawLogs();
394
396
 
395
- process.stdout.write(this.buffer);
396
- this.isDrawing = false;
397
+ // Write buffer in one shot, then flush
398
+ process.stdout.write(this.buffer, () => {
399
+ this.isDrawing = false;
400
+ });
397
401
  }
398
402
 
399
403
  cleanup() {