hedgequantx 2.9.65 → 2.9.66
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
|
@@ -274,14 +274,17 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
274
274
|
lastBias = bias;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
//
|
|
278
|
-
if (currentSecond %
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
277
|
+
// Strategy state log every 10 seconds
|
|
278
|
+
if (currentSecond % 10 === 0) {
|
|
279
|
+
const state = strategy.getAnalysisState?.(contractId, price);
|
|
280
|
+
if (state) {
|
|
281
|
+
if (!state.ready) {
|
|
282
|
+
ui.addLog('system', state.message);
|
|
283
|
+
} else {
|
|
284
|
+
const resStr = state.nearestResistance ? state.nearestResistance.toFixed(2) : '--';
|
|
285
|
+
const supStr = state.nearestSupport ? state.nearestSupport.toFixed(2) : '--';
|
|
286
|
+
ui.addLog('analysis', `Bars: ${state.barsProcessed} | Zones: ${state.activeZones} | Swings: ${state.swingsDetected}`);
|
|
287
|
+
ui.addLog('analysis', `Resistance: ${resStr} | Support: ${supStr}`);
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
}
|