hedgequantx 2.9.202 → 2.9.203

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.202",
3
+ "version": "2.9.203",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  const chalk = require('chalk');
10
10
  const HQX2B = require('./smart-logs-hqx2b');
11
11
  const QUANT = require('./smart-logs-quant');
12
+ const smartLogs = require('./smart-logs');
12
13
 
13
14
  const CONFIG = {
14
15
  SESSION_LOG_INTERVAL: 10,
@@ -168,7 +169,7 @@ class SmartLogsEngine {
168
169
  const events = this._detectEvents(state, this.lastState);
169
170
  this.lastState = { ...state };
170
171
 
171
- // For QUANT strategy: use rich messages with Z-score, VPIN, OFI
172
+ // For QUANT strategy: use rich smart-logs messages
172
173
  if (this.strategyId === 'ultra-scalping' && state.bars >= 5) {
173
174
  const timeSinceLastLog = now - this.lastLogTime;
174
175
 
@@ -176,28 +177,28 @@ class SmartLogsEngine {
176
177
  if (timeSinceLastLog >= CONFIG.LOG_INTERVAL_SECONDS * 1000) {
177
178
  this.lastLogTime = now;
178
179
 
179
- // Use rich QUANT messages with actual metrics
180
- const zStr = zScore.toFixed(2);
181
- const vpinStr = (vpin * 100).toFixed(0);
182
- const ofiStr = (ofi * 100).toFixed(0);
180
+ // Use getLiveAnalysisLog for rich contextual messages
181
+ const trend = zScore > 0.5 ? 'bullish' : zScore < -0.5 ? 'bearish' : 'neutral';
182
+ const liveMessage = smartLogs.getLiveAnalysisLog({
183
+ trend,
184
+ bars: state.bars || 0,
185
+ swings: state.swings || 0,
186
+ zones: state.zones || 0,
187
+ nearZone: state.nearZone || false,
188
+ setupForming: Math.abs(zScore) >= 1.5,
189
+ });
183
190
 
184
- // Choose message based on z-score level
185
- let message;
186
- if (Math.abs(zScore) >= 1.5) {
187
- // Near signal threshold - use zones message
188
- message = T.zones({
189
- sym, price, zScore: zStr, vpin: vpinStr, ofi: ofiStr,
190
- ticks: state.tickCount || state.bars
191
- });
192
- } else if (Math.abs(zScore) >= 0.8) {
193
- // Building - use building message
194
- message = T.building({ sym, ticks: state.tickCount || state.bars });
195
- } else {
196
- // Neutral - use simpler analysis
197
- message = T.priceMove({ sym, price, dir: zScore > 0 ? 'up' : 'down', ticks: Math.abs(zScore).toFixed(1) });
198
- }
191
+ // Add quant metrics suffix
192
+ const zStr = zScore.toFixed(2);
193
+ const vpinPct = (vpin * 100).toFixed(0);
194
+ const ofiPct = (ofi * 100).toFixed(0);
195
+ const metrics = chalk.gray(` | Z:${zStr} VPIN:${vpinPct}% OFI:${ofiPct}%`);
199
196
 
200
- return { type: 'analysis', message, logToSession: this.counter % CONFIG.SESSION_LOG_INTERVAL === 0 };
197
+ return {
198
+ type: 'analysis',
199
+ message: `[${sym}] ${liveMessage}${metrics}`,
200
+ logToSession: this.counter % CONFIG.SESSION_LOG_INTERVAL === 0
201
+ };
201
202
  }
202
203
  return null;
203
204
  }