hedgequantx 1.2.132 → 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 +12 -2
package/package.json
CHANGED
package/src/pages/algo.js
CHANGED
|
@@ -1880,13 +1880,23 @@ const launchCopyTrading = async (config) => {
|
|
|
1880
1880
|
});
|
|
1881
1881
|
|
|
1882
1882
|
hqxServer.on('error', (data) => {
|
|
1883
|
-
|
|
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
|
+
}
|
|
1884
1894
|
});
|
|
1885
1895
|
|
|
1886
1896
|
hqxServer.on('disconnected', () => {
|
|
1887
1897
|
hqxConnected = false;
|
|
1888
1898
|
if (!stopReason) {
|
|
1889
|
-
addLog('
|
|
1899
|
+
addLog('warning', 'HQX Server disconnected - Switching to Monitor Mode');
|
|
1890
1900
|
}
|
|
1891
1901
|
});
|
|
1892
1902
|
|