hedgequantx 2.6.27 → 2.6.28
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
|
@@ -587,15 +587,17 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
587
587
|
|
|
588
588
|
// Heartbeat every 30 seconds - show strategy model values
|
|
589
589
|
if (Date.now() - lastHeartbeat > 30000) {
|
|
590
|
-
|
|
591
|
-
|
|
590
|
+
// Try to get model values from strategy
|
|
591
|
+
const modelValues = strategy.getModelValues?.(contractId) || strategy.getState?.() || null;
|
|
592
|
+
if (modelValues && (modelValues.ofi !== undefined || modelValues.delta !== undefined)) {
|
|
592
593
|
const ofi = (modelValues.ofi || 0).toFixed(1);
|
|
593
594
|
const delta = (modelValues.delta || 0).toFixed(1);
|
|
594
|
-
const zscore = (modelValues.zscore || 0).toFixed(2);
|
|
595
|
+
const zscore = (modelValues.zscore || modelValues.zScore || 0).toFixed(2);
|
|
595
596
|
const momentum = modelValues.momentum ? (modelValues.momentum > 0 ? 'BULL' : 'BEAR') : 'FLAT';
|
|
596
597
|
algoLogger.info(ui, 'M1 STATUS', `OFI=${ofi} Delta=${delta} Z=${zscore} ${momentum} | ${tps} ticks/30s`);
|
|
597
598
|
} else {
|
|
598
|
-
|
|
599
|
+
// Show tick count and price to confirm data is flowing
|
|
600
|
+
algoLogger.info(ui, 'SCANNING', `${tps} ticks/30s | ${tickCount} total | price=${tickData.price}`);
|
|
599
601
|
}
|
|
600
602
|
lastHeartbeat = Date.now();
|
|
601
603
|
tps = 0;
|