hedgequantx 2.6.26 → 2.6.27
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
|
@@ -585,9 +585,18 @@ const launchAlgo = async (service, account, contract, config) => {
|
|
|
585
585
|
|
|
586
586
|
stats.latency = Date.now() - latencyStart;
|
|
587
587
|
|
|
588
|
-
// Heartbeat every 30 seconds
|
|
588
|
+
// Heartbeat every 30 seconds - show strategy model values
|
|
589
589
|
if (Date.now() - lastHeartbeat > 30000) {
|
|
590
|
-
|
|
590
|
+
const modelValues = strategy.getModelValues?.(contractId);
|
|
591
|
+
if (modelValues) {
|
|
592
|
+
const ofi = (modelValues.ofi || 0).toFixed(1);
|
|
593
|
+
const delta = (modelValues.delta || 0).toFixed(1);
|
|
594
|
+
const zscore = (modelValues.zscore || 0).toFixed(2);
|
|
595
|
+
const momentum = modelValues.momentum ? (modelValues.momentum > 0 ? 'BULL' : 'BEAR') : 'FLAT';
|
|
596
|
+
algoLogger.info(ui, 'M1 STATUS', `OFI=${ofi} Delta=${delta} Z=${zscore} ${momentum} | ${tps} ticks/30s`);
|
|
597
|
+
} else {
|
|
598
|
+
algoLogger.heartbeat(ui, tps, stats.latency);
|
|
599
|
+
}
|
|
591
600
|
lastHeartbeat = Date.now();
|
|
592
601
|
tps = 0;
|
|
593
602
|
}
|