hedgequantx 2.9.89 → 2.9.90

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.9.89",
3
+ "version": "2.9.90",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -411,19 +411,21 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
411
411
  await marketFeed.connect(rithmicCredentials);
412
412
  await marketFeed.subscribe(symbolCode, contract.exchange || 'CME');
413
413
 
414
- // Preload historical bars for instant strategy warmup
415
- ui.addLog('system', 'Loading historical data...');
416
- try {
417
- const historicalBars = await marketFeed.getHistoricalBars(symbolCode, contract.exchange || 'CME', 30);
418
- if (historicalBars && historicalBars.length > 0 && strategy.preloadBars) {
419
- strategy.preloadBars(contractId, historicalBars);
420
- ui.addLog('system', `Loaded ${historicalBars.length} historical bars - strategy ready!`);
421
- } else {
422
- ui.addLog('system', 'No historical bars available - collecting live data...');
414
+ // Preload historical bars for HQX-2B strategy only (bar-based strategy)
415
+ if (strategyId === 'hqx-2b' && strategy.preloadBars) {
416
+ ui.addLog('system', 'Loading historical bars...');
417
+ try {
418
+ const historicalBars = await marketFeed.getHistoricalBars(symbolCode, contract.exchange || 'CME', 30);
419
+ if (historicalBars && historicalBars.length > 0) {
420
+ strategy.preloadBars(contractId, historicalBars);
421
+ ui.addLog('system', `Loaded ${historicalBars.length} bars - strategy ready!`);
422
+ } else {
423
+ ui.addLog('system', 'No historical bars - collecting live data...');
424
+ }
425
+ } catch (histErr) {
426
+ ui.addLog('debug', `Historical data unavailable: ${histErr.message}`);
427
+ ui.addLog('system', 'Collecting live data...');
423
428
  }
424
- } catch (histErr) {
425
- ui.addLog('debug', `Historical data unavailable: ${histErr.message}`);
426
- ui.addLog('system', 'Collecting live data...');
427
429
  }
428
430
  } catch (e) {
429
431
  ui.addLog('error', `Failed to connect: ${e.message}`);