hedgequantx 2.9.90 → 2.9.91

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.
@@ -687,8 +687,8 @@ var require_core = __commonJS({
687
687
  const bars = this.barHistory.get(contractId) || [];
688
688
  const zones = this.liquidityZones.get(contractId) || [];
689
689
  const swings = this.swingPoints.get(contractId) || [];
690
- if (bars.length < 20) {
691
- return { ready: false, message: `Collecting data... ${bars.length}/20 bars` };
690
+ if (bars.length < 5) {
691
+ return { ready: false, message: `Collecting data... ${bars.length}/5 bars` };
692
692
  }
693
693
  const sortedZones = zones.map((z) => ({ zone: z, distance: Math.abs(currentPrice - z.getLevel()) })).sort((a, b) => a.distance - b.distance);
694
694
  const nearestResistance = sortedZones.find((z) => z.zone.type === ZoneType2.RESISTANCE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.9.90",
3
+ "version": "2.9.91",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -412,19 +412,20 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
412
412
  await marketFeed.subscribe(symbolCode, contract.exchange || 'CME');
413
413
 
414
414
  // Preload historical bars for HQX-2B strategy only (bar-based strategy)
415
+ // Note: HISTORY_PLANT may not be available on all accounts (e.g., paper trading)
415
416
  if (strategyId === 'hqx-2b' && strategy.preloadBars) {
416
- ui.addLog('system', 'Loading historical bars...');
417
417
  try {
418
+ ui.addLog('system', 'Loading historical bars...');
418
419
  const historicalBars = await marketFeed.getHistoricalBars(symbolCode, contract.exchange || 'CME', 30);
419
420
  if (historicalBars && historicalBars.length > 0) {
420
421
  strategy.preloadBars(contractId, historicalBars);
421
- ui.addLog('system', `Loaded ${historicalBars.length} bars - strategy ready!`);
422
+ ui.addLog('system', `Loaded ${historicalBars.length} bars - ready!`);
422
423
  } else {
423
- ui.addLog('system', 'No historical bars - collecting live data...');
424
+ ui.addLog('system', 'No historical data - warming up with live bars...');
424
425
  }
425
426
  } catch (histErr) {
426
- ui.addLog('debug', `Historical data unavailable: ${histErr.message}`);
427
- ui.addLog('system', 'Collecting live data...');
427
+ // HISTORY_PLANT not available (common on paper accounts)
428
+ ui.addLog('system', 'Historical data not available - warming up with live bars...');
428
429
  }
429
430
  }
430
431
  } catch (e) {