hedgequantx 2.9.72 → 2.9.74
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
package/src/lib/smart-logs.js
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
const chalk = require('chalk');
|
|
14
|
+
|
|
13
15
|
// Track recently used messages to avoid repetition
|
|
14
16
|
const recentMessages = new Map();
|
|
15
17
|
const MAX_RECENT = 8; // Increased to handle larger pools
|
|
@@ -377,7 +379,8 @@ function getMarketBiasLog(direction, delta, buyPressure) {
|
|
|
377
379
|
}
|
|
378
380
|
|
|
379
381
|
const message = getVariedMessage(`bias_${direction}`, pool, `${direction} bias`);
|
|
380
|
-
|
|
382
|
+
// Colored arrows: cyan for bullish, magenta for bearish
|
|
383
|
+
const arrow = direction === 'LONG' ? chalk.cyan.bold('▲') : direction === 'SHORT' ? chalk.magenta.bold('▼') : '=';
|
|
381
384
|
|
|
382
385
|
let details;
|
|
383
386
|
if (delta !== undefined && buyPressure !== undefined) {
|
|
@@ -285,6 +285,19 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
285
285
|
const supStr = state.nearestSupport ? state.nearestSupport.toFixed(2) : '--';
|
|
286
286
|
ui.addLog('analysis', `Bars: ${state.barsProcessed} | Zones: ${state.activeZones} | Swings: ${state.swingsDetected}`);
|
|
287
287
|
ui.addLog('analysis', `Resistance: ${resStr} | Support: ${supStr}`);
|
|
288
|
+
|
|
289
|
+
// Explain why no trade
|
|
290
|
+
if (state.activeZones === 0) {
|
|
291
|
+
ui.addLog('risk', 'No zones detected - waiting for swing points');
|
|
292
|
+
} else if (!state.nearestSupport && !state.nearestResistance) {
|
|
293
|
+
ui.addLog('risk', 'Zones too far from price - waiting');
|
|
294
|
+
} else if (!state.nearestSupport) {
|
|
295
|
+
ui.addLog('risk', 'No support zone - only SHORT sweeps possible');
|
|
296
|
+
} else if (!state.nearestResistance) {
|
|
297
|
+
ui.addLog('risk', 'No resistance zone - only LONG sweeps possible');
|
|
298
|
+
} else {
|
|
299
|
+
ui.addLog('ready', 'Zones active - waiting for sweep signal');
|
|
300
|
+
}
|
|
288
301
|
}
|
|
289
302
|
}
|
|
290
303
|
}
|