hedgequantx 1.2.131 → 1.2.133
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 +1 -1
- package/src/pages/algo.js +17 -3
package/package.json
CHANGED
package/src/pages/algo.js
CHANGED
|
@@ -1584,6 +1584,10 @@ const launchCopyTrading = async (config) => {
|
|
|
1584
1584
|
bufferLine(chalk.cyan(V) + chalk.white(center(title1, W)) + chalk.cyan(V));
|
|
1585
1585
|
bufferLine(chalk.cyan(MID));
|
|
1586
1586
|
|
|
1587
|
+
// Centered subtitle
|
|
1588
|
+
const title2 = 'HQX Ultra-Scalping Algorithm';
|
|
1589
|
+
bufferLine(chalk.cyan(V) + chalk.yellow(center(title2, W)) + chalk.cyan(V));
|
|
1590
|
+
|
|
1587
1591
|
// Grid layout - 2 columns
|
|
1588
1592
|
const VS = '\u2502'; // Vertical separator (thin)
|
|
1589
1593
|
const colL = 48, colR = 47;
|
|
@@ -1679,7 +1683,7 @@ const launchCopyTrading = async (config) => {
|
|
|
1679
1683
|
};
|
|
1680
1684
|
|
|
1681
1685
|
// Logs inside the rectangle - newest first, max 30 lines
|
|
1682
|
-
const MAX_VISIBLE_LOGS =
|
|
1686
|
+
const MAX_VISIBLE_LOGS = 50;
|
|
1683
1687
|
|
|
1684
1688
|
if (logs.length === 0) {
|
|
1685
1689
|
const emptyLine = ' Waiting for activity...';
|
|
@@ -1876,13 +1880,23 @@ const launchCopyTrading = async (config) => {
|
|
|
1876
1880
|
});
|
|
1877
1881
|
|
|
1878
1882
|
hqxServer.on('error', (data) => {
|
|
1879
|
-
|
|
1883
|
+
const errorMsg = data.message || 'Unknown error';
|
|
1884
|
+
addLog('error', errorMsg);
|
|
1885
|
+
|
|
1886
|
+
// If algo failed to start, switch to monitor mode
|
|
1887
|
+
if (errorMsg.includes('Failed to start') || errorMsg.includes('WebSocket failed') || errorMsg.includes('Échec')) {
|
|
1888
|
+
if (hqxConnected) {
|
|
1889
|
+
hqxConnected = false;
|
|
1890
|
+
addLog('warning', 'Switching to Monitor Mode (watching Lead positions)');
|
|
1891
|
+
displayUI();
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1880
1894
|
});
|
|
1881
1895
|
|
|
1882
1896
|
hqxServer.on('disconnected', () => {
|
|
1883
1897
|
hqxConnected = false;
|
|
1884
1898
|
if (!stopReason) {
|
|
1885
|
-
addLog('
|
|
1899
|
+
addLog('warning', 'HQX Server disconnected - Switching to Monitor Mode');
|
|
1886
1900
|
}
|
|
1887
1901
|
});
|
|
1888
1902
|
|