hedgequantx 2.6.163 → 2.7.1
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/README.md +15 -88
- package/bin/cli.js +0 -11
- package/dist/lib/api.jsc +0 -0
- package/dist/lib/api2.jsc +0 -0
- package/dist/lib/core.jsc +0 -0
- package/dist/lib/core2.jsc +0 -0
- package/dist/lib/data.js +1 -1
- package/dist/lib/data.jsc +0 -0
- package/dist/lib/data2.jsc +0 -0
- package/dist/lib/decoder.jsc +0 -0
- package/dist/lib/m/mod1.jsc +0 -0
- package/dist/lib/m/mod2.jsc +0 -0
- package/dist/lib/n/r1.jsc +0 -0
- package/dist/lib/n/r2.jsc +0 -0
- package/dist/lib/n/r3.jsc +0 -0
- package/dist/lib/n/r4.jsc +0 -0
- package/dist/lib/n/r5.jsc +0 -0
- package/dist/lib/n/r6.jsc +0 -0
- package/dist/lib/n/r7.jsc +0 -0
- package/dist/lib/o/util1.jsc +0 -0
- package/dist/lib/o/util2.jsc +0 -0
- package/package.json +8 -5
- package/src/app.js +40 -162
- package/src/config/constants.js +31 -33
- package/src/config/propfirms.js +13 -217
- package/src/config/settings.js +0 -43
- package/src/lib/api.js +198 -0
- package/src/lib/api2.js +353 -0
- package/src/lib/core.js +539 -0
- package/src/lib/core2.js +341 -0
- package/src/lib/data.js +555 -0
- package/src/lib/data2.js +492 -0
- package/src/lib/decoder.js +599 -0
- package/src/lib/m/s1.js +804 -0
- package/src/lib/m/s2.js +34 -0
- package/src/lib/n/r1.js +454 -0
- package/src/lib/n/r2.js +514 -0
- package/src/lib/n/r3.js +631 -0
- package/src/lib/n/r4.js +401 -0
- package/src/lib/n/r5.js +335 -0
- package/src/lib/n/r6.js +425 -0
- package/src/lib/n/r7.js +530 -0
- package/src/lib/o/l1.js +44 -0
- package/src/lib/o/l2.js +427 -0
- package/src/lib/python-bridge.js +206 -0
- package/src/menus/connect.js +14 -176
- package/src/menus/dashboard.js +65 -110
- package/src/pages/accounts.js +18 -18
- package/src/pages/algo/copy-trading.js +210 -240
- package/src/pages/algo/index.js +41 -104
- package/src/pages/algo/one-account.js +386 -33
- package/src/pages/algo/ui.js +312 -151
- package/src/pages/orders.js +3 -3
- package/src/pages/positions.js +3 -3
- package/src/pages/stats/chart.js +74 -0
- package/src/pages/stats/display.js +228 -0
- package/src/pages/stats/index.js +236 -0
- package/src/pages/stats/metrics.js +213 -0
- package/src/pages/user.js +6 -6
- package/src/services/hqx-server/constants.js +55 -0
- package/src/services/hqx-server/index.js +401 -0
- package/src/services/hqx-server/latency.js +81 -0
- package/src/services/index.js +12 -3
- package/src/services/rithmic/accounts.js +7 -32
- package/src/services/rithmic/connection.js +1 -204
- package/src/services/rithmic/contracts.js +116 -99
- package/src/services/rithmic/handlers.js +21 -196
- package/src/services/rithmic/index.js +63 -120
- package/src/services/rithmic/market.js +31 -0
- package/src/services/rithmic/orders.js +5 -111
- package/src/services/rithmic/protobuf.js +384 -138
- package/src/services/session.js +22 -173
- package/src/ui/box.js +10 -18
- package/src/ui/index.js +1 -3
- package/src/ui/menu.js +1 -1
- package/src/utils/prompts.js +2 -2
- package/dist/lib/m/s1.js +0 -1
- package/src/menus/ai-agent-connect.js +0 -181
- package/src/menus/ai-agent-models.js +0 -219
- package/src/menus/ai-agent-oauth.js +0 -292
- package/src/menus/ai-agent-ui.js +0 -141
- package/src/menus/ai-agent.js +0 -484
- package/src/pages/algo/algo-config.js +0 -195
- package/src/pages/algo/algo-multi.js +0 -801
- package/src/pages/algo/algo-utils.js +0 -58
- package/src/pages/algo/copy-engine.js +0 -449
- package/src/pages/algo/custom-strategy.js +0 -459
- package/src/pages/algo/logger.js +0 -245
- package/src/pages/algo/smart-logs-data.js +0 -218
- package/src/pages/algo/smart-logs.js +0 -387
- package/src/pages/algo/ui-constants.js +0 -144
- package/src/pages/algo/ui-summary.js +0 -184
- package/src/pages/stats-calculations.js +0 -191
- package/src/pages/stats-ui.js +0 -381
- package/src/pages/stats.js +0 -339
- package/src/services/ai/client-analysis.js +0 -194
- package/src/services/ai/client-models.js +0 -333
- package/src/services/ai/client.js +0 -343
- package/src/services/ai/index.js +0 -384
- package/src/services/ai/oauth-anthropic.js +0 -265
- package/src/services/ai/oauth-gemini.js +0 -223
- package/src/services/ai/oauth-iflow.js +0 -269
- package/src/services/ai/oauth-openai.js +0 -233
- package/src/services/ai/oauth-qwen.js +0 -279
- package/src/services/ai/providers/direct-providers.js +0 -323
- package/src/services/ai/providers/index.js +0 -62
- package/src/services/ai/providers/other-providers.js +0 -104
- package/src/services/ai/proxy-install.js +0 -249
- package/src/services/ai/proxy-manager.js +0 -494
- package/src/services/ai/proxy-remote.js +0 -161
- package/src/services/ai/strategy-supervisor.js +0 -1312
- package/src/services/ai/supervisor-data.js +0 -195
- package/src/services/ai/supervisor-optimize.js +0 -215
- package/src/services/ai/supervisor-sync.js +0 -178
- package/src/services/ai/supervisor-utils.js +0 -158
- package/src/services/ai/supervisor.js +0 -484
- package/src/services/ai/validation.js +0 -250
- package/src/services/hqx-server-events.js +0 -110
- package/src/services/hqx-server-handlers.js +0 -217
- package/src/services/hqx-server-latency.js +0 -136
- package/src/services/hqx-server.js +0 -403
- package/src/services/position-constants.js +0 -28
- package/src/services/position-exit-logic.js +0 -174
- package/src/services/position-manager.js +0 -438
- package/src/services/position-momentum.js +0 -206
- package/src/services/projectx/accounts.js +0 -142
- package/src/services/projectx/index.js +0 -443
- package/src/services/projectx/market.js +0 -172
- package/src/services/projectx/stats.js +0 -110
- package/src/services/projectx/trading.js +0 -180
- package/src/services/rithmic/latency-tracker.js +0 -182
- package/src/services/rithmic/market-data-decoders.js +0 -229
- package/src/services/rithmic/market-data.js +0 -272
- package/src/services/rithmic/orders-fast.js +0 -246
- package/src/services/rithmic/proto-decoders.js +0 -403
- package/src/services/rithmic/specs.js +0 -146
- package/src/services/rithmic/trade-history.js +0 -254
- package/src/services/session-history.js +0 -475
- package/src/services/strategy/hft-signal-calc.js +0 -147
- package/src/services/strategy/hft-tick.js +0 -407
- package/src/services/strategy/recovery-math.js +0 -402
- package/src/services/tradovate/constants.js +0 -109
- package/src/services/tradovate/index.js +0 -392
- package/src/services/tradovate/market.js +0 -47
- package/src/services/tradovate/orders.js +0 -145
- package/src/services/tradovate/websocket.js +0 -97
package/src/services/session.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Secure session management
|
|
2
|
+
* @fileoverview Secure session management - Rithmic Only
|
|
3
3
|
* @module services/session
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ const fs = require('fs');
|
|
|
7
7
|
const path = require('path');
|
|
8
8
|
const os = require('os');
|
|
9
9
|
const crypto = require('crypto');
|
|
10
|
-
const { encrypt, decrypt, maskSensitive
|
|
10
|
+
const { encrypt, decrypt, maskSensitive } = require('../security/encryption');
|
|
11
11
|
const { SECURITY } = require('../config/settings');
|
|
12
12
|
const { logger } = require('../utils/logger');
|
|
13
13
|
|
|
@@ -20,10 +20,6 @@ const SESSION_FILE = path.join(SESSION_DIR, SECURITY.SESSION_FILE);
|
|
|
20
20
|
* Secure session storage with AES-256-GCM encryption
|
|
21
21
|
*/
|
|
22
22
|
const storage = {
|
|
23
|
-
/**
|
|
24
|
-
* Ensures the session directory exists with proper permissions
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
23
|
_ensureDir() {
|
|
28
24
|
if (!fs.existsSync(SESSION_DIR)) {
|
|
29
25
|
fs.mkdirSync(SESSION_DIR, { recursive: true, mode: SECURITY.DIR_PERMISSIONS });
|
|
@@ -31,11 +27,6 @@ const storage = {
|
|
|
31
27
|
}
|
|
32
28
|
},
|
|
33
29
|
|
|
34
|
-
/**
|
|
35
|
-
* Saves sessions with encryption
|
|
36
|
-
* @param {Array} sessions - Sessions to save
|
|
37
|
-
* @returns {boolean} Success status
|
|
38
|
-
*/
|
|
39
30
|
save(sessions) {
|
|
40
31
|
try {
|
|
41
32
|
this._ensureDir();
|
|
@@ -50,10 +41,6 @@ const storage = {
|
|
|
50
41
|
}
|
|
51
42
|
},
|
|
52
43
|
|
|
53
|
-
/**
|
|
54
|
-
* Loads and decrypts sessions
|
|
55
|
-
* @returns {Array} Decrypted sessions or empty array
|
|
56
|
-
*/
|
|
57
44
|
load() {
|
|
58
45
|
try {
|
|
59
46
|
if (!fs.existsSync(SESSION_FILE)) {
|
|
@@ -79,14 +66,9 @@ const storage = {
|
|
|
79
66
|
}
|
|
80
67
|
},
|
|
81
68
|
|
|
82
|
-
/**
|
|
83
|
-
* Securely clears session data
|
|
84
|
-
* @returns {boolean} Success status
|
|
85
|
-
*/
|
|
86
69
|
clear() {
|
|
87
70
|
try {
|
|
88
71
|
if (fs.existsSync(SESSION_FILE)) {
|
|
89
|
-
// Overwrite with random data before deleting
|
|
90
72
|
const size = fs.statSync(SESSION_FILE).size;
|
|
91
73
|
if (size > 0) {
|
|
92
74
|
fs.writeFileSync(SESSION_FILE, crypto.randomBytes(size));
|
|
@@ -102,85 +84,44 @@ const storage = {
|
|
|
102
84
|
},
|
|
103
85
|
};
|
|
104
86
|
|
|
105
|
-
// Lazy load
|
|
106
|
-
let
|
|
87
|
+
// Lazy load RithmicService to avoid circular dependencies
|
|
88
|
+
let RithmicService;
|
|
107
89
|
const loadServices = () => {
|
|
108
|
-
if (!
|
|
109
|
-
({ ProjectXService } = require('./projectx'));
|
|
90
|
+
if (!RithmicService) {
|
|
110
91
|
({ RithmicService } = require('./rithmic'));
|
|
111
|
-
({ TradovateService } = require('./tradovate'));
|
|
112
92
|
}
|
|
113
93
|
};
|
|
114
94
|
|
|
115
95
|
/**
|
|
116
|
-
* Multi-connection manager
|
|
96
|
+
* Multi-connection manager (Rithmic only)
|
|
117
97
|
*/
|
|
118
98
|
const connections = {
|
|
119
|
-
/** @type {Array<{type: string, service: Object, propfirm: string, propfirmKey: string,
|
|
99
|
+
/** @type {Array<{type: string, service: Object, propfirm: string, propfirmKey: string, connectedAt: Date}>} */
|
|
120
100
|
services: [],
|
|
121
101
|
|
|
122
|
-
|
|
123
|
-
* Adds a new connection
|
|
124
|
-
* @param {string} type - Connection type (projectx, rithmic, tradovate)
|
|
125
|
-
* @param {Object} service - Service instance
|
|
126
|
-
* @param {string} [propfirm] - PropFirm name
|
|
127
|
-
* @param {string} [token] - Auth token
|
|
128
|
-
*/
|
|
129
|
-
add(type, service, propfirm = null, token = null) {
|
|
102
|
+
add(type, service, propfirm = null) {
|
|
130
103
|
this.services.push({
|
|
131
104
|
type,
|
|
132
105
|
service,
|
|
133
106
|
propfirm,
|
|
134
107
|
propfirmKey: service.propfirmKey,
|
|
135
|
-
token: token || service.token,
|
|
136
108
|
connectedAt: new Date(),
|
|
137
109
|
});
|
|
138
110
|
this.saveToStorage();
|
|
139
111
|
log.info('Connection added', { type, propfirm: propfirm || type });
|
|
140
112
|
},
|
|
141
113
|
|
|
142
|
-
/**
|
|
143
|
-
* Saves all sessions to encrypted storage
|
|
144
|
-
* IMPORTANT: Preserves AI agent sessions when saving trading connections
|
|
145
|
-
*/
|
|
146
114
|
saveToStorage() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const session = {
|
|
154
|
-
type: conn.type,
|
|
155
|
-
propfirm: conn.propfirm,
|
|
156
|
-
propfirmKey: conn.service.propfirmKey || conn.propfirmKey,
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
if (conn.type === 'projectx') {
|
|
160
|
-
session.token = conn.service.token || conn.token;
|
|
161
|
-
// Save credentials for token refresh (needed for WebSocket connections)
|
|
162
|
-
if (conn.service._credentials) {
|
|
163
|
-
session.credentials = conn.service._credentials;
|
|
164
|
-
}
|
|
165
|
-
} else if (conn.type === 'rithmic' || conn.type === 'tradovate') {
|
|
166
|
-
session.credentials = conn.service.credentials;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return session;
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
// Combine: trading sessions + preserved AI session
|
|
173
|
-
const allSessions = aiSession
|
|
174
|
-
? [...tradingSessions, aiSession]
|
|
175
|
-
: tradingSessions;
|
|
115
|
+
const sessions = this.services.map(conn => ({
|
|
116
|
+
type: conn.type,
|
|
117
|
+
propfirm: conn.propfirm,
|
|
118
|
+
propfirmKey: conn.service.propfirmKey || conn.propfirmKey,
|
|
119
|
+
credentials: conn.service.credentials,
|
|
120
|
+
}));
|
|
176
121
|
|
|
177
|
-
storage.save(
|
|
122
|
+
storage.save(sessions);
|
|
178
123
|
},
|
|
179
124
|
|
|
180
|
-
/**
|
|
181
|
-
* Restores sessions from encrypted storage
|
|
182
|
-
* @returns {Promise<boolean>} True if sessions were restored
|
|
183
|
-
*/
|
|
184
125
|
async restoreFromStorage() {
|
|
185
126
|
loadServices();
|
|
186
127
|
const sessions = storage.load();
|
|
@@ -202,35 +143,11 @@ const connections = {
|
|
|
202
143
|
return this.services.length > 0;
|
|
203
144
|
},
|
|
204
145
|
|
|
205
|
-
/**
|
|
206
|
-
* Restores a single session
|
|
207
|
-
* @private
|
|
208
|
-
*/
|
|
209
146
|
async _restoreSession(session) {
|
|
210
147
|
const { type, propfirm, propfirmKey } = session;
|
|
211
148
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
service.token = session.token;
|
|
215
|
-
|
|
216
|
-
// Restore credentials for token refresh (needed for WebSocket)
|
|
217
|
-
if (session.credentials) {
|
|
218
|
-
service._credentials = session.credentials;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
const userResult = await service.getUser();
|
|
222
|
-
if (userResult.success) {
|
|
223
|
-
this.services.push({
|
|
224
|
-
type,
|
|
225
|
-
service,
|
|
226
|
-
propfirm,
|
|
227
|
-
propfirmKey,
|
|
228
|
-
token: session.token,
|
|
229
|
-
connectedAt: new Date(),
|
|
230
|
-
});
|
|
231
|
-
log.debug('ProjectX session restored');
|
|
232
|
-
}
|
|
233
|
-
} else if (type === 'rithmic' && session.credentials) {
|
|
149
|
+
// Only restore Rithmic sessions
|
|
150
|
+
if (type === 'rithmic' && session.credentials) {
|
|
234
151
|
const service = new RithmicService(propfirmKey || 'apex_rithmic');
|
|
235
152
|
const result = await service.login(session.credentials.username, session.credentials.password);
|
|
236
153
|
|
|
@@ -244,41 +161,22 @@ const connections = {
|
|
|
244
161
|
});
|
|
245
162
|
log.debug('Rithmic session restored');
|
|
246
163
|
}
|
|
247
|
-
} else if (type === 'tradovate' && session.credentials) {
|
|
248
|
-
const service = new TradovateService(propfirmKey || 'tradovate');
|
|
249
|
-
const result = await service.login(session.credentials.username, session.credentials.password);
|
|
250
|
-
|
|
251
|
-
if (result.success) {
|
|
252
|
-
this.services.push({
|
|
253
|
-
type,
|
|
254
|
-
service,
|
|
255
|
-
propfirm,
|
|
256
|
-
propfirmKey,
|
|
257
|
-
connectedAt: new Date(),
|
|
258
|
-
});
|
|
259
|
-
log.debug('Tradovate session restored');
|
|
260
|
-
}
|
|
261
164
|
}
|
|
262
165
|
},
|
|
263
166
|
|
|
264
|
-
/**
|
|
265
|
-
* Removes a connection by index
|
|
266
|
-
* @param {number} index - Connection index
|
|
267
|
-
*/
|
|
268
167
|
remove(index) {
|
|
269
168
|
if (index < 0 || index >= this.services.length) return;
|
|
270
169
|
|
|
271
170
|
const conn = this.services[index];
|
|
272
171
|
|
|
273
|
-
if (conn.service?.
|
|
172
|
+
if (conn.service?.disconnect) {
|
|
274
173
|
try {
|
|
275
|
-
conn.service.
|
|
174
|
+
conn.service.disconnect();
|
|
276
175
|
} catch (err) {
|
|
277
|
-
log.warn('
|
|
176
|
+
log.warn('Disconnect failed', { error: err.message });
|
|
278
177
|
}
|
|
279
178
|
}
|
|
280
179
|
|
|
281
|
-
// Clear credentials from memory
|
|
282
180
|
if (conn.service?.credentials) {
|
|
283
181
|
conn.service.credentials = null;
|
|
284
182
|
}
|
|
@@ -288,35 +186,18 @@ const connections = {
|
|
|
288
186
|
log.info('Connection removed', { type: conn.type });
|
|
289
187
|
},
|
|
290
188
|
|
|
291
|
-
/**
|
|
292
|
-
* Gets all connections
|
|
293
|
-
* @returns {Array}
|
|
294
|
-
*/
|
|
295
189
|
getAll() {
|
|
296
190
|
return this.services;
|
|
297
191
|
},
|
|
298
192
|
|
|
299
|
-
/**
|
|
300
|
-
* Gets connections by type
|
|
301
|
-
* @param {string} type - Connection type
|
|
302
|
-
* @returns {Array}
|
|
303
|
-
*/
|
|
304
193
|
getByType(type) {
|
|
305
194
|
return this.services.filter(c => c.type === type);
|
|
306
195
|
},
|
|
307
196
|
|
|
308
|
-
/**
|
|
309
|
-
* Gets connection count
|
|
310
|
-
* @returns {number}
|
|
311
|
-
*/
|
|
312
197
|
count() {
|
|
313
198
|
return this.services.length;
|
|
314
199
|
},
|
|
315
200
|
|
|
316
|
-
/**
|
|
317
|
-
* Gets all accounts from all connections
|
|
318
|
-
* @returns {Promise<Array>}
|
|
319
|
-
*/
|
|
320
201
|
async getAllAccounts() {
|
|
321
202
|
const allAccounts = [];
|
|
322
203
|
|
|
@@ -342,11 +223,6 @@ const connections = {
|
|
|
342
223
|
return allAccounts;
|
|
343
224
|
},
|
|
344
225
|
|
|
345
|
-
/**
|
|
346
|
-
* Gets the service for a specific account
|
|
347
|
-
* @param {string|number} accountId - Account ID
|
|
348
|
-
* @returns {Object|null}
|
|
349
|
-
*/
|
|
350
226
|
getServiceForAccount(accountId) {
|
|
351
227
|
for (const conn of this.services) {
|
|
352
228
|
if (!conn.service?.accounts) continue;
|
|
@@ -362,31 +238,16 @@ const connections = {
|
|
|
362
238
|
return null;
|
|
363
239
|
},
|
|
364
240
|
|
|
365
|
-
/**
|
|
366
|
-
* Checks if any connection is active
|
|
367
|
-
* @returns {boolean}
|
|
368
|
-
*/
|
|
369
241
|
isConnected() {
|
|
370
242
|
return this.services.length > 0;
|
|
371
243
|
},
|
|
372
244
|
|
|
373
|
-
/**
|
|
374
|
-
* Disconnects all trading connections (preserves AI agents)
|
|
375
|
-
*/
|
|
376
245
|
disconnectAll() {
|
|
377
|
-
// Preserve AI session before clearing
|
|
378
|
-
const existingSessions = storage.load();
|
|
379
|
-
const aiSession = existingSessions.find(s => s.type === 'ai');
|
|
380
|
-
|
|
381
246
|
for (const conn of this.services) {
|
|
382
247
|
try {
|
|
383
|
-
if (conn.service?.logout) {
|
|
384
|
-
conn.service.logout();
|
|
385
|
-
}
|
|
386
248
|
if (conn.service?.disconnect) {
|
|
387
249
|
conn.service.disconnect();
|
|
388
250
|
}
|
|
389
|
-
// Clear credentials
|
|
390
251
|
if (conn.service?.credentials) {
|
|
391
252
|
conn.service.credentials = null;
|
|
392
253
|
}
|
|
@@ -396,26 +257,14 @@ const connections = {
|
|
|
396
257
|
}
|
|
397
258
|
|
|
398
259
|
this.services = [];
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
if (aiSession) {
|
|
402
|
-
storage.save([aiSession]);
|
|
403
|
-
log.info('Trading connections disconnected (AI agents preserved)');
|
|
404
|
-
} else {
|
|
405
|
-
storage.clear();
|
|
406
|
-
log.info('All connections disconnected');
|
|
407
|
-
}
|
|
260
|
+
storage.clear();
|
|
261
|
+
log.info('All connections disconnected');
|
|
408
262
|
},
|
|
409
263
|
|
|
410
|
-
/**
|
|
411
|
-
* Gets masked connection info for logging
|
|
412
|
-
* @returns {Array}
|
|
413
|
-
*/
|
|
414
264
|
getInfo() {
|
|
415
265
|
return this.services.map(conn => ({
|
|
416
266
|
type: conn.type,
|
|
417
267
|
propfirm: conn.propfirm,
|
|
418
|
-
token: maskSensitive(conn.token),
|
|
419
268
|
connectedAt: conn.connectedAt,
|
|
420
269
|
}));
|
|
421
270
|
},
|
package/src/ui/box.js
CHANGED
|
@@ -11,19 +11,22 @@ let logoWidth = null;
|
|
|
11
11
|
/**
|
|
12
12
|
* Get logo width for consistent box sizing
|
|
13
13
|
* Adapts to terminal width for mobile devices
|
|
14
|
-
* Returns 98 for desktop to match the full HEDGEQUANTX logo width
|
|
15
14
|
*/
|
|
16
15
|
const getLogoWidth = () => {
|
|
17
|
-
const termWidth = process.stdout.columns ||
|
|
16
|
+
const termWidth = process.stdout.columns || 80;
|
|
18
17
|
|
|
19
18
|
// Mobile: use terminal width
|
|
20
19
|
if (termWidth < 60) {
|
|
21
20
|
return Math.max(termWidth - 2, 40);
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
// Desktop:
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
// Desktop: use logo width
|
|
24
|
+
if (!logoWidth) {
|
|
25
|
+
const logoText = figlet.textSync('HEDGEQUANTX', { font: 'ANSI Shadow' });
|
|
26
|
+
const lines = logoText.split('\n').filter(line => line.trim().length > 0);
|
|
27
|
+
logoWidth = Math.max(...lines.map(line => line.length)) + 4;
|
|
28
|
+
}
|
|
29
|
+
return Math.min(logoWidth, termWidth - 2);
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
/**
|
|
@@ -55,7 +58,7 @@ const padText = (text, width) => {
|
|
|
55
58
|
};
|
|
56
59
|
|
|
57
60
|
/**
|
|
58
|
-
* Draw box header with title
|
|
61
|
+
* Draw box header with title
|
|
59
62
|
*/
|
|
60
63
|
const drawBoxHeader = (title, width) => {
|
|
61
64
|
const innerWidth = width - 2;
|
|
@@ -64,16 +67,6 @@ const drawBoxHeader = (title, width) => {
|
|
|
64
67
|
console.log(chalk.cyan('\u2560' + '\u2550'.repeat(innerWidth) + '\u2563'));
|
|
65
68
|
};
|
|
66
69
|
|
|
67
|
-
/**
|
|
68
|
-
* Draw box header that continues from previous box (uses ╠ instead of ╔)
|
|
69
|
-
*/
|
|
70
|
-
const drawBoxHeaderContinue = (title, width) => {
|
|
71
|
-
const innerWidth = width - 2;
|
|
72
|
-
console.log(chalk.cyan('\u2560' + '\u2550'.repeat(innerWidth) + '\u2563'));
|
|
73
|
-
console.log(chalk.cyan('\u2551') + chalk.cyan.bold(centerText(title, innerWidth)) + chalk.cyan('\u2551'));
|
|
74
|
-
console.log(chalk.cyan('\u2560' + '\u2550'.repeat(innerWidth) + '\u2563'));
|
|
75
|
-
};
|
|
76
|
-
|
|
77
70
|
/**
|
|
78
71
|
* Draw box footer
|
|
79
72
|
*/
|
|
@@ -104,7 +97,7 @@ const drawBoxSeparator = (width) => {
|
|
|
104
97
|
const printLogo = () => {
|
|
105
98
|
const logoText = figlet.textSync('HEDGEQUANTX', { font: 'ANSI Shadow' });
|
|
106
99
|
console.log(chalk.cyan(logoText));
|
|
107
|
-
console.log(chalk.gray.italic('
|
|
100
|
+
console.log(chalk.gray.italic(' Prop Futures Algo Trading CLI'));
|
|
108
101
|
console.log();
|
|
109
102
|
};
|
|
110
103
|
|
|
@@ -114,7 +107,6 @@ module.exports = {
|
|
|
114
107
|
centerText,
|
|
115
108
|
padText,
|
|
116
109
|
drawBoxHeader,
|
|
117
|
-
drawBoxHeaderContinue,
|
|
118
110
|
drawBoxFooter,
|
|
119
111
|
drawBoxRow,
|
|
120
112
|
drawBoxSeparator,
|
package/src/ui/index.js
CHANGED
|
@@ -10,7 +10,6 @@ const {
|
|
|
10
10
|
centerText,
|
|
11
11
|
padText,
|
|
12
12
|
drawBoxHeader,
|
|
13
|
-
drawBoxHeaderContinue,
|
|
14
13
|
drawBoxFooter,
|
|
15
14
|
drawBoxRow,
|
|
16
15
|
drawBoxSeparator,
|
|
@@ -71,7 +70,7 @@ const displayBanner = () => {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
|
|
74
|
-
const tagline = isMobile ? `HQX v${version}` : `
|
|
73
|
+
const tagline = isMobile ? `HQX v${version}` : `Prop Futures Algo Trading v${version}`;
|
|
75
74
|
console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
|
|
76
75
|
};
|
|
77
76
|
|
|
@@ -106,7 +105,6 @@ module.exports = {
|
|
|
106
105
|
centerText,
|
|
107
106
|
padText,
|
|
108
107
|
drawBoxHeader,
|
|
109
|
-
drawBoxHeaderContinue,
|
|
110
108
|
drawBoxFooter,
|
|
111
109
|
drawBoxRow,
|
|
112
110
|
drawBoxSeparator,
|
package/src/ui/menu.js
CHANGED
|
@@ -48,7 +48,7 @@ const createBoxMenu = async (title, items, options = {}) => {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
|
|
51
|
-
console.log(chalk.cyan('║') + chalk.white(centerText(`
|
|
51
|
+
console.log(chalk.cyan('║') + chalk.white(centerText(`Prop Futures Algo Trading v${version}`, innerWidth)) + chalk.cyan('║'));
|
|
52
52
|
|
|
53
53
|
// Stats bar if provided
|
|
54
54
|
if (options.statsLine) {
|
package/src/utils/prompts.js
CHANGED
|
@@ -80,10 +80,10 @@ const nativePrompt = (message) => {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Wait for Enter key
|
|
83
|
-
* @param {string} [message='
|
|
83
|
+
* @param {string} [message='Press Enter to continue...'] - Message to display
|
|
84
84
|
* @returns {Promise<void>}
|
|
85
85
|
*/
|
|
86
|
-
const waitForEnter = async (message = '
|
|
86
|
+
const waitForEnter = async (message = 'Press Enter to continue...') => {
|
|
87
87
|
await nativePrompt(message);
|
|
88
88
|
};
|
|
89
89
|
|
package/dist/lib/m/s1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x5591bb=_0x2648;function _0x18e0(){const _0x31aae3=['yxjuAw0','qvrf','ttjl','Ee5ZzgG','v0vbsW','rKP3sgK','u3nsuNi','ugn0','C3ncyxi','AwfUy2u','mtb8mJm','vu5ltK8','quTKBM4','zxjYB3i','x2fNz3i','CvbnC1y','z3nREgq','s0XJs3G','CvPIr2u','wK1erKC','re1tve8','tvLn','AMHlEK0','AwnRCW','zgvYrMW','y2TZ','Aw5PDgK','B2zP','zw1PDa','BhvLCW','u2LNBMe','q0LzBLO','DxrLvLa','BLbYB2m','vg9cyxi','Fde4Fdi','tu5r','y2XVC2u','EvrOCMu','ywnR','ru5r','CgfYyw0','CKXYA1G','Dg9gAxG','CKHPC3q','zxzLBNq','qM9UDxm','s1HqrKe','C0j1zMy','AxnL','BNroB2K','Axnfsxu','vxPYzwq','BgfZDei','D1vmtem','B3LpzNO','DxvPza','t1HPsg0','C2HVDwW','s014Avm','whLrC3u','B2zPtg8','AMDMuwi','zKneqKy','DgzwAK4','mty4mdq5wNvyBejs','ohW5Fdu','DxrLt3i','DM9SDw0','twDQB1q','EMPxEwq','DxnVr2i','sffyvwW','z2v0qMe','B25PwKG','zxnZtM8','AxbSAwu','veT5DgG','svbZExm','nhW2Fde','yMfYsgK','Cg93','BMD0Aa','A3H1Dum','tKTe','zKPIteG','v2TWv3y','zgvSvMe','DgLAEwu','B3DjBwi','C2XPy2u','yxrYsgK','Dw1iuey','B3jL','Fdj8mW','mhW4FdK','ChvZAa','zMfNzee','DhjHu2m','wunvzem','y3H4D2S','CMvHAW','yw5gAwW','t2nMz2C','C3bSAxq','wNPhwg8','yMrH','sKfZwvq','mhWYnhW','qNLAu2m','C2P0CfK','B0zhEwi','mtbjuw1QwLa','q1fdr1y','CNfPz3e','CMvZzxq','DxrLs3K','zg9wzw0','mti3ntKZou1rreX3sW','swnesLG','zwDHDgu','qLPgyNG','DgLJA0i','q292yxi','s0HStue','ywX1zq','C3fYDa','yw1Izge','s1v3qK4','qxHXy0e','DxjLBwu','DgvY','BffXDuu','BwfW','s1jeyuq','ru1otu0','wendwu8','B2TIywm','Ag9Sza','u1rst04','BhPSs1K','DNbPBLq','DhjHzgu','x2nHBgm','DwzMzxi','yNv5','DhLszwC','qKLe','zuj1zMy','z2v0','BKPtB3y','zuLvvue','sufQvg0','wNzgq24','Fdj8m3W','wvvkrfK','B2XK','x2DLBMu','Be1Z','ywXHBMm','FdD8nNW','t3jKzxi','seDdww8','uhbNBNq','x2nVBxa','BM93','zvjLC3u','zuv4Axq','Aw5KB3C','swDnu3O','rNHXzNu','x2rLDgu','CLrcy0C','zxzLBLq','qvnl','AhjLC2G','z2fowvC','q1fHDMu','CuXPAKC','tvDOA3C','A0H5sM0','C3rVCe0','nZeYmtbAAgPkvu4','DwXHDgu','ywjZ','qMHOEKW','vuPpCKe','D2nrEee','B3j5','BgvUz3q','nJz4tw5NB3a','C2LNBMe','CuPjChK','yxr0rui','uvHhufe','Fdj8mti','rhLAzvC','s2HPrvO','BK1Lyxm','x2fWCgW','yuzty08','Fdb8oxW','tuvt','y29UDhi','DeXVy2S','yNjLywS','C3rVCNK','CLfIsxG','yMfZzvq','EK1TCee','ChjVy2u','CMvKDwm','Dg9WvgK','vKLUsxO','AwXPDhK','ENnJB3i','AgLNAa','wNj5shO','B3HPy1q','v0rRzNG','y29Yzq','ru1e','C2L0zq','EuTHBg0','y29UzMK','Bwf4','FdH8mW','AhvJq2y','DhjLywS','sMDxzLC','DfrYywq','quf0vwe','ndb6zw1RD2S','vgLJA3m','DwX0Axa','A2fSBwe','CMvJzw4','ufb6vLG','y29TCg8','mtq1mJy2AwnZwKPh','y3rwB2W','ywn0swq','qvrs','vvHyD2W','z2v0tw8','zMLSDgu','DgfYz2u','ywnQtxC','su5h','twDeree','tu9ervi','yxrL','vKvswv8','uLrz','CM91BMq','DNbPBLC','Bg9ZC1m','rejVBuy','ruTYB2O','A1LkwfC','r1vbwKG','nte4ndbYqK5eBK0','wwvKBxy','ywXPEMu','AgfZ','BLn0yxq','C2HPzNq','uMzOtve','sffyx1u','uePAB1u','C2vSBa','ChjPy2u','zuvUDhi','BwLU','Cuzpthy','yxjNzxq','qwzMCK8','tg9VA2i','DgLJA1m','DgLJA1y','AeLOBfK','mtn8mtu','mxW3Fdy','mJj8mJy','ChjVzMK','BMLZzue','u05bueG','C2HVCNq','BgTdB3e','vgHYzxm','De11Bhq','sujMweO','Fdf8m3W','DgvYDMe','zhzZCe4','sKfIDgK','z2rmsw4','A1rxAMS','y1j6zMK','zgvUy2u','Chrttgq','AKrpr2y','Bg93','q1jmywC','zvrOCMu','rfv0BNy','C2HVBgq','Cvnrq1G','BgLLCG','Bg9UzW','mtaXmdmYuNrWzK9s','ngPAvvLuBq','yvb0tu0','BM9YBwe','AwDUywW','Bgvmyw0','D2LUu3q','zxn0Aw0','ntiWntmYmw5PCuPryq','CMf0zvm','CMvJB3i','Cwv0D1m','qNvMzMu','C2v0','Fdi1Fda','yMfYsw4','t2XPDeO','yxrPBgK','Aw1L','u2jRy0G','r3fWEwy','zxHWB3i','twvTtfO','nxW2Fdq','BM9zBxe','AxPL','y0zyu0q','rxf0Dfi','DxrLwLm'];_0x18e0=function(){return _0x31aae3;};return _0x18e0();}(function(_0x2295a1,_0x3bdbb4){const _0x348132=_0x2648,_0x4af857=_0x2295a1();while(!![]){try{const _0x2cea8f=-parseInt(_0x348132(0x210))/0x1*(-parseInt(_0x348132(0x242))/0x2)+-parseInt(_0x348132(0x1fa))/0x3+parseInt(_0x348132(0x241))/0x4+parseInt(_0x348132(0x1c1))/0x5*(-parseInt(_0x348132(0x1c9))/0x6)+parseInt(_0x348132(0x29f))/0x7*(-parseInt(_0x348132(0x1f3))/0x8)+-parseInt(_0x348132(0x2d4))/0x9+parseInt(_0x348132(0x2ce))/0xa*(parseInt(_0x348132(0x249))/0xb);if(_0x2cea8f===_0x3bdbb4)break;else _0x4af857['push'](_0x4af857['shift']());}catch(_0x4603d4){_0x4af857['push'](_0x4af857['shift']());}}}(_0x18e0,0x2105b));function _0x2648(_0x502c55,_0x54ce96){_0x502c55=_0x502c55-0x182;const _0x18e0c1=_0x18e0();let _0x26480d=_0x18e0c1[_0x502c55];if(_0x2648['dYVuVK']===undefined){var _0x564953=function(_0x4ad93e){const _0x27e1a5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x378742='',_0x4be18f='';for(let _0x5c1601=0x0,_0x31a4d4,_0x95b27f,_0x4c8ac6=0x0;_0x95b27f=_0x4ad93e['charAt'](_0x4c8ac6++);~_0x95b27f&&(_0x31a4d4=_0x5c1601%0x4?_0x31a4d4*0x40+_0x95b27f:_0x95b27f,_0x5c1601++%0x4)?_0x378742+=String['fromCharCode'](0xff&_0x31a4d4>>(-0x2*_0x5c1601&0x6)):0x0){_0x95b27f=_0x27e1a5['indexOf'](_0x95b27f);}for(let _0xee9ac0=0x0,_0x4b6692=_0x378742['length'];_0xee9ac0<_0x4b6692;_0xee9ac0++){_0x4be18f+='%'+('00'+_0x378742['charCodeAt'](_0xee9ac0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4be18f);};_0x2648['XBnPAc']=_0x564953,_0x2648['Agxabm']={},_0x2648['dYVuVK']=!![];}const _0x6a1b72=_0x18e0c1[0x0],_0x24efc0=_0x502c55+_0x6a1b72,_0x58798b=_0x2648['Agxabm'][_0x24efc0];return!_0x58798b?(_0x26480d=_0x2648['XBnPAc'](_0x26480d),_0x2648['Agxabm'][_0x24efc0]=_0x26480d):_0x26480d=_0x58798b,_0x26480d;}const EventEmitter=require(_0x5591bb(0x28b)+'s'),{v4:uuidv4}=require(_0x5591bb(0x296)),_0x3df7ea={};_0x3df7ea[_0x5591bb(0x19e)]=_0x5591bb(0x19e),_0x3df7ea['ASK']='ASK';const OrderSide=_0x3df7ea,_0x53a837={};_0x53a837['WEAK']=_0x5591bb(0x262),_0x53a837[_0x5591bb(0x205)+_0x5591bb(0x25f)]='MODER'+_0x5591bb(0x25f),_0x53a837[_0x5591bb(0x196)+'G']='STRON'+'G',_0x53a837[_0x5591bb(0x207)+_0x5591bb(0x196)+'G']=_0x5591bb(0x207)+_0x5591bb(0x196)+'G';const SignalStrength=_0x53a837;function extractBaseSymbol(_0x5f3474){const _0xd379a6=_0x5591bb,_0x34e757={};_0x34e757[_0xd379a6(0x25b)]=_0xd379a6(0x1e8),_0x34e757[_0xd379a6(0x233)]='RTY',_0x34e757[_0xd379a6(0x20c)]='MNQ',_0x34e757[_0xd379a6(0x2a8)]=_0xd379a6(0x1d5),_0x34e757['kHyJm']=_0xd379a6(0x273),_0x34e757['ptSLd']=_0xd379a6(0x2b2),_0x34e757[_0xd379a6(0x23c)]=_0xd379a6(0x269)+'WN',_0x34e757[_0xd379a6(0x2ac)]=function(_0x13dd4e,_0x279053){return _0x13dd4e>=_0x279053;};const _0x438dc4=_0x34e757,_0x224683={};_0x224683[_0xd379a6(0x286)]='NQ',_0x224683['EP']='ES',_0x224683[_0xd379a6(0x1e8)]=_0x438dc4[_0xd379a6(0x25b)],_0x224683[_0xd379a6(0x208)]=_0x438dc4[_0xd379a6(0x233)],_0x224683[_0xd379a6(0x282)]=_0x438dc4[_0xd379a6(0x20c)],_0x224683[_0xd379a6(0x1d5)]=_0x438dc4['oniZH'],_0x224683[_0xd379a6(0x260)]='M2K',_0x224683[_0xd379a6(0x273)]=_0x438dc4[_0xd379a6(0x1bf)],_0x224683[_0xd379a6(0x2b2)]=_0x438dc4[_0xd379a6(0x237)],_0x224683['GC']='GC',_0x224683['SI']='SI',_0x224683['CL']='CL',_0x224683['YM']='YM';const _0x4c81a9=_0x224683;if(!_0x5f3474)return _0x438dc4['DUtnv'];const _0x36eb4b=_0x5f3474['split']('.');if(_0x438dc4[_0xd379a6(0x2ac)](_0x36eb4b[_0xd379a6(0x1c8)+'h'],0x4)){const _0x3b219b=_0x36eb4b[0x3];return _0x4c81a9[_0x3b219b]||_0x3b219b;}return _0x5f3474;}class HQXUltraScalpingStrategy extends EventEmitter{constructor(){const _0x40bdfa=_0x5591bb,_0x4582a=('14|19'+'|17|1'+'6|21|'+'11|4|'+_0x40bdfa(0x226)+_0x40bdfa(0x281)+_0x40bdfa(0x2ca)+_0x40bdfa(0x268)+_0x40bdfa(0x22f)+_0x40bdfa(0x224)+_0x40bdfa(0x1ce)+_0x40bdfa(0x1ab)+_0x40bdfa(0x2a0)+_0x40bdfa(0x24f))[_0x40bdfa(0x2c6)]('|');let _0x32f1ce=0x0;while(!![]){switch(_0x4582a[_0x32f1ce++]){case'0':this[_0x40bdfa(0x20b)+_0x40bdfa(0x1ef)]=0x0;continue;case'1':this[_0x40bdfa(0x227)+'tLock'+_0x40bdfa(0x265)]=0.5;continue;case'2':this['volum'+_0x40bdfa(0x19f)+'er']=new Map();continue;case'3':this[_0x40bdfa(0x2ae)+_0x40bdfa(0x1d9)]=new Map();continue;case'4':this[_0x40bdfa(0x198)+'oxicT'+_0x40bdfa(0x1ba)+_0x40bdfa(0x1a7)]=0.7;continue;case'5':this[_0x40bdfa(0x1f7)+'tTrad'+'es']=[];continue;case'6':this[_0x40bdfa(0x185)+_0x40bdfa(0x19b)]=new Map();continue;case'7':this['atrHi'+_0x40bdfa(0x1d9)]=new Map();continue;case'8':this[_0x40bdfa(0x293)+_0x40bdfa(0x25e)+'e']=new Map();continue;case'9':this[_0x40bdfa(0x250)+_0x40bdfa(0x230)+_0x40bdfa(0x1a9)]=0x1388;continue;case'10':this[_0x40bdfa(0x1db)+'arget'+_0x40bdfa(0x1f4)]=0x10;continue;case'11':this[_0x40bdfa(0x20a)+_0x40bdfa(0x1b3)]=0x32;continue;case'12':this[_0x40bdfa(0x199)+'sBuff'+'er']=new Map();continue;case'13':this['kalma'+_0x40bdfa(0x214)+'es']=new Map();continue;case'14':super();continue;case'15':this[_0x40bdfa(0x21a)+_0x40bdfa(0x24d)+'r']=new Map();continue;case'16':this[_0x40bdfa(0x1e2)+_0x40bdfa(0x21b)+_0x40bdfa(0x284)+'shold']=1.5;continue;case'17':this['tickV'+_0x40bdfa(0x188)]=0x5;continue;case'18':this['volat'+_0x40bdfa(0x1e1)+_0x40bdfa(0x220)+_0x40bdfa(0x285)]=0x64;continue;case'19':this['tickS'+'ize']=0.25;continue;case'20':this[_0x40bdfa(0x29b)+_0x40bdfa(0x194)+'k']=0x14;continue;case'21':this[_0x40bdfa(0x1e2)+'eExit'+_0x40bdfa(0x22c)+'hold']=0.5;continue;case'22':this[_0x40bdfa(0x1f6)+_0x40bdfa(0x27f)+_0x40bdfa(0x2a9)+_0x40bdfa(0x28f)]=0.01;continue;case'23':this[_0x40bdfa(0x1d8)+'evenT'+_0x40bdfa(0x275)]=0x4;continue;case'24':this['baseS'+_0x40bdfa(0x1df)+_0x40bdfa(0x277)]=0x8;continue;case'25':this[_0x40bdfa(0x247)+_0x40bdfa(0x2c3)]=0x0;continue;case'26':this[_0x40bdfa(0x1f6)+_0x40bdfa(0x1d1)+_0x40bdfa(0x18d)+_0x40bdfa(0x290)+'se']=0.1;continue;}break;}}[_0x5591bb(0x278)+_0x5591bb(0x212)](_0x20c01f,_0x17763a=0.25,_0x487d7a=0x5){const _0x292509=_0x5591bb,_0x32e7b8={};_0x32e7b8[_0x292509(0x202)]=_0x292509(0x2ad)+'|5|7|'+_0x292509(0x2bd)+_0x292509(0x2bc);const _0x408d07=_0x32e7b8,_0x1f3c12=_0x408d07[_0x292509(0x202)][_0x292509(0x2c6)]('|');let _0x3f44a2=0x0;while(!![]){switch(_0x1f3c12[_0x3f44a2++]){case'0':this[_0x292509(0x199)+'sBuff'+'er']['set'](_0x20c01f,[]);continue;case'1':this[_0x292509(0x2ae)+'story'][_0x292509(0x24e)](_0x20c01f,[]);continue;case'2':this[_0x292509(0x293)+_0x292509(0x25e)+'e'][_0x292509(0x24e)](_0x20c01f,0x0);continue;case'3':const _0x1cf7f0={};_0x1cf7f0['estim'+'ate']=0x0,_0x1cf7f0['error'+'Covar'+_0x292509(0x267)]=0x1,this['kalma'+_0x292509(0x214)+'es'][_0x292509(0x24e)](_0x20c01f,_0x1cf7f0);continue;case'4':this[_0x292509(0x221)+'ize']=_0x17763a;continue;case'5':this['price'+'Buffe'+'r'][_0x292509(0x24e)](_0x20c01f,[]);continue;case'6':this[_0x292509(0x222)+_0x292509(0x188)]=_0x487d7a;continue;case'7':this[_0x292509(0x2a2)+_0x292509(0x19f)+'er'][_0x292509(0x24e)](_0x20c01f,[]);continue;case'8':this[_0x292509(0x2b9)+_0x292509(0x1d9)][_0x292509(0x24e)](_0x20c01f,[]);continue;case'9':this[_0x292509(0x185)+'uffer'][_0x292509(0x24e)](_0x20c01f,[]);continue;}break;}}[_0x5591bb(0x1dd)+'ssTic'+'k'](_0x37422b){const _0x30d381=_0x5591bb,_0x2069e5={};_0x2069e5[_0x30d381(0x29a)]=function(_0x5c7ca1,_0x424b02){return _0x5c7ca1/_0x424b02;},_0x2069e5[_0x30d381(0x20f)]=function(_0x1ec9f1,_0x4bfaee){return _0x1ec9f1-_0x4bfaee;},_0x2069e5[_0x30d381(0x29d)]=function(_0x35a7c7,_0x50d0ee){return _0x35a7c7*_0x50d0ee;},_0x2069e5[_0x30d381(0x24c)]=function(_0x316286,_0x3bf50b){return _0x316286-_0x3bf50b;},_0x2069e5['gaNYW']=function(_0x1ac641,_0x1fed3f){return _0x1ac641===_0x1fed3f;},_0x2069e5[_0x30d381(0x257)]='rjvpO',_0x2069e5['OqmVX']=function(_0x312bba,_0x44fbd4){return _0x312bba>=_0x44fbd4;},_0x2069e5[_0x30d381(0x25c)]=function(_0x3270d2,_0x21c801){return _0x3270d2>_0x21c801;};const _0x1be0df=_0x2069e5,_0x51a4d7=_0x37422b[_0x30d381(0x1d6)+_0x30d381(0x1fc)];if(!this[_0x30d381(0x2ae)+_0x30d381(0x1d9)][_0x30d381(0x213)](_0x51a4d7)){if(_0x1be0df[_0x30d381(0x1bb)](_0x1be0df[_0x30d381(0x257)],_0x1be0df[_0x30d381(0x257)]))this['initi'+_0x30d381(0x212)](_0x51a4d7);else{const _0x3105e=_0x5d644c['high']-_0x3ff063[_0x30d381(0x239)];if(_0x3105e>0x0){const _0x36aead=_0x1be0df['XyQsu'](_0x1be0df['GUAZH'](_0x50fce8[_0x30d381(0x283)],_0x36813c['low']),_0x3105e);_0x169fa8+=_0x1be0df[_0x30d381(0x29d)](_0x36aead,_0x237f88[_0x30d381(0x2a2)+'e']),_0x44b9bb+=_0x1be0df[_0x30d381(0x24c)](0x1,_0x36aead)*_0x1b9477['volum'+'e'];}}}let _0x590156=this[_0x30d381(0x185)+'uffer'][_0x30d381(0x1a0)](_0x51a4d7);_0x590156[_0x30d381(0x2be)](_0x37422b);const _0x4a8cbe=Date[_0x30d381(0x1b0)](),_0x2437ee=this['lastB'+_0x30d381(0x25e)+'e'][_0x30d381(0x1a0)](_0x51a4d7);if(_0x1be0df['OqmVX'](_0x4a8cbe-_0x2437ee,this['barIn'+'terva'+'lMs'])&&_0x1be0df[_0x30d381(0x25c)](_0x590156[_0x30d381(0x1c8)+'h'],0x0)){const _0x3ebc91=this[_0x30d381(0x26c)+'egate'+'Ticks'+_0x30d381(0x280)](_0x590156,_0x4a8cbe);this[_0x30d381(0x185)+_0x30d381(0x19b)][_0x30d381(0x24e)](_0x51a4d7,[]),this[_0x30d381(0x293)+_0x30d381(0x25e)+'e'][_0x30d381(0x24e)](_0x51a4d7,_0x4a8cbe);if(_0x3ebc91){const _0x3ac518=this[_0x30d381(0x1dd)+_0x30d381(0x266)](_0x51a4d7,_0x3ebc91);if(_0x3ac518)return this[_0x30d381(0x27a)](_0x30d381(0x1ca)+'l',_0x3ac518),_0x3ac518;}}return null;}[_0x5591bb(0x26c)+_0x5591bb(0x183)+'Ticks'+_0x5591bb(0x280)](_0x4a3a47,_0x27d474){const _0x463b5b=_0x5591bb,_0x30c16f={};_0x30c16f[_0x463b5b(0x291)]=function(_0x13f3ec,_0x51184c){return _0x13f3ec<_0x51184c;},_0x30c16f[_0x463b5b(0x28d)]=function(_0x1f65af,_0x1a0362){return _0x1f65af===_0x1a0362;},_0x30c16f[_0x463b5b(0x263)]=function(_0x18c8c6,_0x49a4cf){return _0x18c8c6===_0x49a4cf;},_0x30c16f[_0x463b5b(0x2b3)]=_0x463b5b(0x1a3),_0x30c16f[_0x463b5b(0x1cc)]=function(_0x476881,_0x2b8274){return _0x476881>_0x2b8274;},_0x30c16f[_0x463b5b(0x1ee)]=function(_0x596b70,_0xf6c140){return _0x596b70-_0xf6c140;},_0x30c16f[_0x463b5b(0x261)]=function(_0x267865,_0x3850a9){return _0x267865===_0x3850a9;},_0x30c16f['MWhkw']=_0x463b5b(0x22e),_0x30c16f[_0x463b5b(0x231)]=function(_0x5ac181,_0x898cea){return _0x5ac181/_0x898cea;},_0x30c16f[_0x463b5b(0x235)]=function(_0x4c673a,_0x3faee9){return _0x4c673a-_0x3faee9;};const _0x175c00=_0x30c16f;if(_0x175c00['KXPFA'](_0x4a3a47['lengt'+'h'],0x0))return null;const _0x53c204=_0x4a3a47[_0x463b5b(0x190)](_0x557b3a=>_0x557b3a['price'])['filte'+'r'](_0x3b35cc=>_0x3b35cc!=null);if(_0x175c00[_0x463b5b(0x263)](_0x53c204['lengt'+'h'],0x0))return null;let _0x11b4fe=0x0,_0x599a0b=0x0;for(let _0x203c9b=0x1;_0x175c00[_0x463b5b(0x291)](_0x203c9b,_0x4a3a47['lengt'+'h']);_0x203c9b++){if(_0x175c00[_0x463b5b(0x28d)](_0x175c00[_0x463b5b(0x2b3)],_0x463b5b(0x1a3))){const _0x6558b2=_0x4a3a47[_0x203c9b][_0x463b5b(0x2a2)+'e']||0x1;if(_0x175c00[_0x463b5b(0x1cc)](_0x4a3a47[_0x203c9b][_0x463b5b(0x21a)],_0x4a3a47[_0x203c9b-0x1]['price']))_0x11b4fe+=_0x6558b2;else{if(_0x175c00['isEIu'](_0x4a3a47[_0x203c9b]['price'],_0x4a3a47[_0x175c00[_0x463b5b(0x1ee)](_0x203c9b,0x1)][_0x463b5b(0x21a)]))_0x599a0b+=_0x6558b2;else{if(_0x175c00[_0x463b5b(0x261)]('CKtZh',_0x175c00[_0x463b5b(0x1be)])){const _0x47f198=this[_0x463b5b(0x21a)+_0x463b5b(0x24d)+'r']['get'](_0x4785af);if(!_0x47f198||_0x175c00[_0x463b5b(0x291)](_0x47f198[_0x463b5b(0x1c8)+'h'],0x32))return![];const _0x57b07d=this[_0x463b5b(0x1af)+_0x463b5b(0x25d)+_0x463b5b(0x1e7)](_0x47f198);return _0x2c0af4['abs'](_0x57b07d)<this[_0x463b5b(0x1e2)+_0x463b5b(0x1b2)+_0x463b5b(0x22c)+_0x463b5b(0x195)];}else _0x11b4fe+=_0x6558b2/0x2,_0x599a0b+=_0x175c00['dvspN'](_0x6558b2,0x2);}}}else this['initi'+_0x463b5b(0x212)](_0xbee702),_0xa2a016=this[_0x463b5b(0x2ae)+_0x463b5b(0x1d9)][_0x463b5b(0x1a0)](_0x26b19f);}return{'timestamp':_0x27d474,'open':_0x53c204[0x0],'high':Math[_0x463b5b(0x1ec)](..._0x53c204),'low':Math['min'](..._0x53c204),'close':_0x53c204[_0x175c00[_0x463b5b(0x235)](_0x53c204[_0x463b5b(0x1c8)+'h'],0x1)],'volume':_0x4a3a47[_0x463b5b(0x1de)+'e']((_0x6b3588,_0xf4055e)=>_0x6b3588+(_0xf4055e[_0x463b5b(0x2a2)+'e']||0x1),0x0),'delta':_0x11b4fe-_0x599a0b,'tickCount':_0x4a3a47[_0x463b5b(0x1c8)+'h']};}['proce'+'ssBar'](_0x3ce123,_0x4d79af){const _0x412c14=_0x5591bb,_0x3db3ae={};_0x3db3ae['MheuW']=function(_0x1b56cd,_0x32fc1d){return _0x1b56cd>_0x32fc1d;},_0x3db3ae[_0x412c14(0x2a3)]=function(_0x5c6d2b,_0x536aa3){return _0x5c6d2b*_0x536aa3;},_0x3db3ae['tCaqQ']=function(_0x471b7e,_0x5d1410){return _0x471b7e>_0x5d1410;},_0x3db3ae['usoGb']=function(_0x364ea7,_0x4210ec){return _0x364ea7/_0x4210ec;},_0x3db3ae['SNAPH']=function(_0x3bf7f9,_0x1bc4dc){return _0x3bf7f9-_0x1bc4dc;},_0x3db3ae[_0x412c14(0x193)]=function(_0x3a758e,_0xaadb0e){return _0x3a758e<_0xaadb0e;};const _0x55b252=_0x3db3ae;let _0x16d192=this[_0x412c14(0x2ae)+'story'][_0x412c14(0x1a0)](_0x3ce123);!_0x16d192&&(this[_0x412c14(0x278)+'alize'](_0x3ce123),_0x16d192=this['barHi'+_0x412c14(0x1d9)]['get'](_0x3ce123));_0x16d192['push'](_0x4d79af);if(_0x16d192[_0x412c14(0x1c8)+'h']>0x1f4)_0x16d192['shift']();const _0x52521c=this[_0x412c14(0x21a)+'Buffe'+'r'][_0x412c14(0x1a0)](_0x3ce123);_0x52521c[_0x412c14(0x2be)](_0x4d79af[_0x412c14(0x283)]);if(_0x55b252['MheuW'](_0x52521c[_0x412c14(0x1c8)+'h'],0xc8))_0x52521c[_0x412c14(0x215)]();const _0x5954f6=this[_0x412c14(0x2a2)+_0x412c14(0x19f)+'er'][_0x412c14(0x1a0)](_0x3ce123),_0xcef88b=_0x4d79af[_0x412c14(0x1e3)]-_0x4d79af[_0x412c14(0x239)];let _0x248e55=_0x4d79af[_0x412c14(0x2a2)+'e']*0.5,_0x6db9ad=_0x55b252['MgjoT'](_0x4d79af['volum'+'e'],0.5);if(_0x55b252['tCaqQ'](_0xcef88b,0x0)){const _0x4f098b=_0x55b252[_0x412c14(0x2a5)](_0x55b252[_0x412c14(0x229)](_0x4d79af['close'],_0x4d79af['low']),_0xcef88b);_0x248e55=_0x55b252['MgjoT'](_0x4d79af[_0x412c14(0x2a2)+'e'],_0x4f098b),_0x6db9ad=_0x55b252[_0x412c14(0x2a3)](_0x4d79af[_0x412c14(0x2a2)+'e'],_0x55b252[_0x412c14(0x229)](0x1,_0x4f098b));}const _0x2d80ee={};_0x2d80ee[_0x412c14(0x19c)]=_0x248e55,_0x2d80ee[_0x412c14(0x219)]=_0x6db9ad,_0x5954f6['push'](_0x2d80ee);if(_0x5954f6[_0x412c14(0x1c8)+'h']>0x64)_0x5954f6['shift']();if(_0x55b252['XCCYO'](_0x16d192[_0x412c14(0x1c8)+'h'],0x32))return null;const _0x105e80=this['_comp'+_0x412c14(0x25d)+_0x412c14(0x1e7)](_0x52521c),_0x3c64c2=this['_comp'+_0x412c14(0x27e)+'IN'](_0x5954f6),_0x352f4a=this[_0x412c14(0x1af)+_0x412c14(0x2d2)+'leLam'+_0x412c14(0x2c8)](_0x16d192),_0x2582fc=this[_0x412c14(0x1d2)+_0x412c14(0x1ea)+_0x412c14(0x2c4)+_0x412c14(0x18e)](_0x3ce123,_0x4d79af[_0x412c14(0x283)]),{regime:_0xaca6e0,params:_0x128f16}=this[_0x412c14(0x1b6)+_0x412c14(0x1fb)+_0x412c14(0x252)+_0x412c14(0x19d)+_0x412c14(0x253)](_0x3ce123,_0x16d192),_0x522258=this[_0x412c14(0x1af)+_0x412c14(0x2a1)+_0x412c14(0x276)+_0x412c14(0x2b7)+_0x412c14(0x1aa)+'e'](_0x16d192);return this[_0x412c14(0x1a8)+_0x412c14(0x24a)+_0x412c14(0x245)](_0x3ce123,_0x4d79af[_0x412c14(0x283)],_0x105e80,_0x3c64c2,_0x352f4a,_0x2582fc,_0xaca6e0,_0x128f16,_0x522258,_0x16d192);}[_0x5591bb(0x1af)+'uteZS'+_0x5591bb(0x1e7)](_0x3ce9a8,_0x4c6092=0x32){const _0x304ac8=_0x5591bb,_0x1e9967={};_0x1e9967[_0x304ac8(0x234)]=function(_0xe0b1b3,_0xe3f90c){return _0xe0b1b3<_0xe3f90c;},_0x1e9967['Uzred']=function(_0x8284f7,_0x6216ea){return _0x8284f7/_0x6216ea;},_0x1e9967[_0x304ac8(0x1c5)]=function(_0x1d811e,_0x9c2a35){return _0x1d811e/_0x9c2a35;},_0x1e9967[_0x304ac8(0x22b)]=function(_0x3c819e,_0x24f214){return _0x3c819e<_0x24f214;},_0x1e9967[_0x304ac8(0x197)]=function(_0x4d5015,_0x25e0d9){return _0x4d5015-_0x25e0d9;},_0x1e9967['doVem']=function(_0x136fd5,_0x4b883f){return _0x136fd5-_0x4b883f;};const _0x37093a=_0x1e9967;if(_0x37093a[_0x304ac8(0x234)](_0x3ce9a8['lengt'+'h'],_0x4c6092))return 0x0;const _0x410753=_0x3ce9a8[_0x304ac8(0x2b8)](-_0x4c6092),_0xd52ef6=_0x37093a[_0x304ac8(0x292)](_0x410753[_0x304ac8(0x1de)+'e']((_0x307b29,_0x1772bb)=>_0x307b29+_0x1772bb,0x0),_0x4c6092),_0x5b18ef=_0x37093a['UJOrA'](_0x410753[_0x304ac8(0x1de)+'e']((_0x27bf84,_0x2910fd)=>_0x27bf84+Math[_0x304ac8(0x2af)](_0x2910fd-_0xd52ef6,0x2),0x0),_0x4c6092),_0x5e1f77=Math[_0x304ac8(0x189)](_0x5b18ef);if(_0x37093a[_0x304ac8(0x22b)](_0x5e1f77,0.0001))return 0x0;return _0x37093a[_0x304ac8(0x1c5)](_0x37093a[_0x304ac8(0x197)](_0x3ce9a8[_0x37093a[_0x304ac8(0x2d3)](_0x3ce9a8['lengt'+'h'],0x1)],_0xd52ef6),_0x5e1f77);}['_comp'+'uteVP'+'IN'](_0x7d8f90){const _0x2b5f89=_0x5591bb,_0x5cb7a5={};_0x5cb7a5[_0x2b5f89(0x243)]=function(_0x30b95b,_0x5b5422){return _0x30b95b<_0x5b5422;},_0x5cb7a5[_0x2b5f89(0x254)]=function(_0x2dc224,_0x352eab){return _0x2dc224+_0x352eab;},_0x5cb7a5[_0x2b5f89(0x216)]=function(_0x13da66,_0x2cb557){return _0x13da66<_0x2cb557;},_0x5cb7a5[_0x2b5f89(0x1e4)]=function(_0x88c747,_0x311a50){return _0x88c747/_0x311a50;},_0x5cb7a5[_0x2b5f89(0x1c4)]=function(_0x537587,_0x3d9859){return _0x537587-_0x3d9859;};const _0x48c3d6=_0x5cb7a5;if(_0x48c3d6[_0x2b5f89(0x243)](_0x7d8f90[_0x2b5f89(0x1c8)+'h'],this[_0x2b5f89(0x20a)+_0x2b5f89(0x1b3)]))return 0.5;const _0x88d364=_0x7d8f90['slice'](-this[_0x2b5f89(0x20a)+_0x2b5f89(0x1b3)]);let _0x2f1b9c=0x0,_0x115471=0x0;for(const _0x185d9e of _0x88d364){_0x2f1b9c+=_0x185d9e[_0x2b5f89(0x19c)],_0x115471+=_0x185d9e[_0x2b5f89(0x219)];}const _0x734be1=_0x48c3d6[_0x2b5f89(0x254)](_0x2f1b9c,_0x115471);if(_0x48c3d6[_0x2b5f89(0x216)](_0x734be1,0x1))return 0.5;return _0x48c3d6[_0x2b5f89(0x1e4)](Math[_0x2b5f89(0x1c3)](_0x48c3d6[_0x2b5f89(0x1c4)](_0x2f1b9c,_0x115471)),_0x734be1);}[_0x5591bb(0x1af)+_0x5591bb(0x2d2)+_0x5591bb(0x246)+_0x5591bb(0x2c8)](_0x3ac1b9){const _0x1ffbcb=_0x5591bb,_0x569371={};_0x569371['HGCYo']=function(_0xac0d77,_0x315537){return _0xac0d77<_0x315537;},_0x569371[_0x1ffbcb(0x297)]=function(_0x1a12cb,_0x567cd5){return _0x1a12cb-_0x567cd5;},_0x569371[_0x1ffbcb(0x223)]=function(_0x4dd8cd,_0x484e33){return _0x4dd8cd-_0x484e33;},_0x569371[_0x1ffbcb(0x26e)]=function(_0x21fc46,_0x11103d){return _0x21fc46/_0x11103d;},_0x569371[_0x1ffbcb(0x271)]=function(_0xa43a2a,_0x14038f){return _0xa43a2a<_0x14038f;},_0x569371['uTGDf']=function(_0x5ae04f,_0x492401){return _0x5ae04f*_0x492401;},_0x569371[_0x1ffbcb(0x1bc)]=function(_0x455b80,_0x1151c7){return _0x455b80-_0x1151c7;},_0x569371[_0x1ffbcb(0x26d)]=function(_0x4bf52a,_0xd5a912){return _0x4bf52a/_0xd5a912;};const _0xbac1e0=_0x569371;if(_0xbac1e0[_0x1ffbcb(0x1ad)](_0x3ac1b9[_0x1ffbcb(0x1c8)+'h'],0x14))return 0x0;const _0x4af815=_0x3ac1b9[_0x1ffbcb(0x2b8)](-0x14),_0x3e57f1=[],_0x111074=[];for(let _0x209e43=0x1;_0x209e43<_0x4af815[_0x1ffbcb(0x1c8)+'h'];_0x209e43++){_0x3e57f1[_0x1ffbcb(0x2be)](_0xbac1e0[_0x1ffbcb(0x297)](_0x4af815[_0x209e43]['close'],_0x4af815[_0xbac1e0[_0x1ffbcb(0x223)](_0x209e43,0x1)][_0x1ffbcb(0x283)])),_0x111074[_0x1ffbcb(0x2be)](_0x4af815[_0x209e43]['volum'+'e']);}const _0x4d87df=_0xbac1e0[_0x1ffbcb(0x26e)](_0x3e57f1['reduc'+'e']((_0x1cac5f,_0x3633c7)=>_0x1cac5f+_0x3633c7,0x0),_0x3e57f1[_0x1ffbcb(0x1c8)+'h']),_0x5053e0=_0x111074[_0x1ffbcb(0x1de)+'e']((_0x3a5c4c,_0x7f574d)=>_0x3a5c4c+_0x7f574d,0x0)/_0x111074[_0x1ffbcb(0x1c8)+'h'];let _0x21599f=0x0,_0x1ee8f7=0x0;for(let _0x3efc64=0x0;_0xbac1e0[_0x1ffbcb(0x271)](_0x3efc64,_0x3e57f1['lengt'+'h']);_0x3efc64++){_0x21599f+=_0xbac1e0['uTGDf'](_0x3e57f1[_0x3efc64]-_0x4d87df,_0xbac1e0[_0x1ffbcb(0x223)](_0x111074[_0x3efc64],_0x5053e0)),_0x1ee8f7+=Math[_0x1ffbcb(0x2af)](_0xbac1e0[_0x1ffbcb(0x1bc)](_0x111074[_0x3efc64],_0x5053e0),0x2);}_0x21599f/=_0x3e57f1[_0x1ffbcb(0x1c8)+'h'],_0x1ee8f7/=_0x3e57f1[_0x1ffbcb(0x1c8)+'h'];if(_0x1ee8f7<0.0001)return 0x0;return Math['abs'](_0xbac1e0['qPMsV'](_0x21599f,_0x1ee8f7));}[_0x5591bb(0x1d2)+_0x5591bb(0x1ea)+'anFil'+'ter'](_0x352504,_0x5cb5c){const _0x4a0c94=_0x5591bb,_0x38e1b6={};_0x38e1b6[_0x4a0c94(0x26f)]=function(_0x4b1a47,_0x4ec25a){return _0x4b1a47+_0x4ec25a;},_0x38e1b6[_0x4a0c94(0x259)]=function(_0x3fa3b3,_0x1f1abe){return _0x3fa3b3/_0x1f1abe;},_0x38e1b6[_0x4a0c94(0x232)]=function(_0x1ff968,_0x5d289c){return _0x1ff968*_0x5d289c;},_0x38e1b6['fQXsD']=function(_0x53b923,_0x533276){return _0x53b923-_0x533276;},_0x38e1b6[_0x4a0c94(0x264)]=function(_0x24a65b,_0x27191a){return _0x24a65b*_0x27191a;};const _0x89d0f2=_0x38e1b6;let _0x444891=this[_0x4a0c94(0x1f6)+_0x4a0c94(0x214)+'es'][_0x4a0c94(0x1a0)](_0x352504);if(!_0x444891){const _0x5ec0ac={};return _0x5ec0ac['estim'+'ate']=_0x5cb5c,_0x5ec0ac[_0x4a0c94(0x26b)+'Covar'+_0x4a0c94(0x267)]=0x1,_0x444891=_0x5ec0ac,this[_0x4a0c94(0x1f6)+_0x4a0c94(0x214)+'es'][_0x4a0c94(0x24e)](_0x352504,_0x444891),_0x5cb5c;}const _0x2512e1=_0x444891[_0x4a0c94(0x248)+_0x4a0c94(0x206)],_0x1f74e8=_0x89d0f2[_0x4a0c94(0x26f)](_0x444891['error'+_0x4a0c94(0x186)+_0x4a0c94(0x267)],this['kalma'+_0x4a0c94(0x27f)+_0x4a0c94(0x2a9)+_0x4a0c94(0x28f)]),_0x44a591=_0x89d0f2['noYmq'](_0x1f74e8,_0x89d0f2[_0x4a0c94(0x26f)](_0x1f74e8,this['kalma'+_0x4a0c94(0x1d1)+_0x4a0c94(0x18d)+_0x4a0c94(0x290)+'se']));return _0x444891[_0x4a0c94(0x248)+'ate']=_0x2512e1+_0x89d0f2['JAbti'](_0x44a591,_0x89d0f2['fQXsD'](_0x5cb5c,_0x2512e1)),_0x444891[_0x4a0c94(0x26b)+'Covar'+_0x4a0c94(0x267)]=_0x89d0f2[_0x4a0c94(0x264)](0x1-_0x44a591,_0x1f74e8),_0x444891[_0x4a0c94(0x248)+_0x4a0c94(0x206)];}['_dete'+_0x5591bb(0x1fb)+_0x5591bb(0x252)+_0x5591bb(0x19d)+_0x5591bb(0x253)](_0x8017e4,_0x529e2d){const _0xc739b8=_0x5591bb,_0x22feba={};_0x22feba[_0xc739b8(0x2b6)]=_0xc739b8(0x1ca)+'l',_0x22feba['Gqpyf']=function(_0x526e5f,_0x11ccf0){return _0x526e5f<_0x11ccf0;},_0x22feba['zpOgE']=function(_0x51d07a,_0x4ee590){return _0x51d07a-_0x4ee590;},_0x22feba['qLijG']=function(_0x312f24,_0x1fc449){return _0x312f24*_0x1fc449;},_0x22feba['tfVjN']=function(_0x4569a2,_0x52efb6){return _0x4569a2-_0x52efb6;},_0x22feba['YCUdC']=function(_0x45956b,_0x44e9a5){return _0x45956b-_0x44e9a5;},_0x22feba['WDkfx']=function(_0x435c8a,_0x573a41){return _0x435c8a<_0x573a41;},_0x22feba[_0xc739b8(0x1c6)]=function(_0x110468,_0x19e374){return _0x110468/_0x19e374;},_0x22feba[_0xc739b8(0x1f2)]=function(_0x30cfe0,_0x7cd3da){return _0x30cfe0>_0x7cd3da;},_0x22feba[_0xc739b8(0x1f0)]=function(_0x4759a8,_0x583062){return _0x4759a8!==_0x583062;},_0x22feba['OlitJ']=function(_0x4f0663,_0x1659d9){return _0x4f0663/_0x1659d9;},_0x22feba[_0xc739b8(0x2cc)]=function(_0x1a8922,_0x2d5e76){return _0x1a8922===_0x2d5e76;},_0x22feba[_0xc739b8(0x27d)]=_0xc739b8(0x1a6),_0x22feba[_0xc739b8(0x1ae)]=_0xc739b8(0x239),_0x22feba[_0xc739b8(0x1b4)]=_0xc739b8(0x244)+'l',_0x22feba[_0xc739b8(0x270)]=_0xc739b8(0x21d);const _0x4302ae=_0x22feba,_0x5da05c=this[_0xc739b8(0x19a)+_0xc739b8(0x1c2)+_0xc739b8(0x1fd)](_0x529e2d);let _0x4e6d75=this['atrHi'+_0xc739b8(0x1d9)][_0xc739b8(0x1a0)](_0x8017e4);!_0x4e6d75&&(_0x4e6d75=[],this[_0xc739b8(0x2b9)+_0xc739b8(0x1d9)][_0xc739b8(0x24e)](_0x8017e4,_0x4e6d75));_0x4e6d75[_0xc739b8(0x2be)](_0x5da05c);if(_0x4302ae[_0xc739b8(0x1f2)](_0x4e6d75[_0xc739b8(0x1c8)+'h'],0x1f4))_0x4e6d75[_0xc739b8(0x215)]();let _0x1db8d4=0.5;if(_0x4e6d75[_0xc739b8(0x1c8)+'h']>=0x14){if(_0x4302ae[_0xc739b8(0x1f0)](_0xc739b8(0x29c),'jgfQb'))return this[_0xc739b8(0x27a)](_0x4302ae[_0xc739b8(0x2b6)],_0xa5d8ec),_0x2a0385;else _0x1db8d4=_0x4302ae[_0xc739b8(0x251)](_0x4e6d75['filte'+'r'](_0x4e0d6b=>_0x4e0d6b<=_0x5da05c)[_0xc739b8(0x1c8)+'h'],_0x4e6d75[_0xc739b8(0x1c8)+'h']);}let _0x2f2f3f,_0x5914d8;if(_0x4302ae[_0xc739b8(0x255)](_0x1db8d4,0.25)){if(_0x4302ae[_0xc739b8(0x2cc)](_0x4302ae['CIYnZ'],_0xc739b8(0x184))){_0x485259=_0xc739b8(0x239);const _0x561915={};_0x561915['stopM'+_0xc739b8(0x1f5)+_0xc739b8(0x23f)]=0.8,_0x561915['targe'+_0xc739b8(0x22d)+_0xc739b8(0x2aa)+'r']=0.9,_0x561915['zscor'+_0xc739b8(0x23b)+_0xc739b8(0x23d)]=1.2,_0x561915[_0xc739b8(0x1eb)+_0xc739b8(0x236)+_0xc739b8(0x28c)]=0.05,_0x4af59d=_0x561915;}else{_0x2f2f3f=_0x4302ae[_0xc739b8(0x1ae)];const _0x25547d={};_0x25547d['stopM'+_0xc739b8(0x1f5)+'lier']=0.8,_0x25547d[_0xc739b8(0x201)+_0xc739b8(0x22d)+'iplie'+'r']=0.9,_0x25547d['zscor'+'eThre'+_0xc739b8(0x23d)]=1.2,_0x25547d[_0xc739b8(0x1eb)+_0xc739b8(0x236)+_0xc739b8(0x28c)]=0.05,_0x5914d8=_0x25547d;}}else{if(_0x1db8d4<0.75){_0x2f2f3f=_0x4302ae['IgMSz'];const _0x4d02cc={};_0x4d02cc[_0xc739b8(0x1c0)+_0xc739b8(0x1f5)+'lier']=0x1,_0x4d02cc[_0xc739b8(0x201)+_0xc739b8(0x22d)+_0xc739b8(0x2aa)+'r']=0x1,_0x4d02cc[_0xc739b8(0x1e2)+_0xc739b8(0x23b)+_0xc739b8(0x23d)]=1.5,_0x4d02cc[_0xc739b8(0x1eb)+_0xc739b8(0x236)+_0xc739b8(0x28c)]=0x0,_0x5914d8=_0x4d02cc;}else{if(_0x4302ae[_0xc739b8(0x2cc)](_0x4302ae[_0xc739b8(0x270)],_0xc739b8(0x2b1))){if(_0x4302ae['Gqpyf'](_0x352478[_0xc739b8(0x1c8)+'h'],0x14))return 0x0;const _0x568aaf=_0xb86cc5[_0xc739b8(0x2b8)](-0x14),_0x4290ab=[],_0x58078a=[];for(let _0x1be15d=0x1;_0x1be15d<_0x568aaf[_0xc739b8(0x1c8)+'h'];_0x1be15d++){_0x4290ab[_0xc739b8(0x2be)](_0x4302ae['zpOgE'](_0x568aaf[_0x1be15d][_0xc739b8(0x283)],_0x568aaf[_0x1be15d-0x1]['close'])),_0x58078a[_0xc739b8(0x2be)](_0x568aaf[_0x1be15d][_0xc739b8(0x2a2)+'e']);}const _0x3bb11=_0x4290ab[_0xc739b8(0x1de)+'e']((_0x13cd1d,_0x144512)=>_0x13cd1d+_0x144512,0x0)/_0x4290ab[_0xc739b8(0x1c8)+'h'],_0x5e24ea=_0x58078a[_0xc739b8(0x1de)+'e']((_0x32005e,_0x214ba6)=>_0x32005e+_0x214ba6,0x0)/_0x58078a[_0xc739b8(0x1c8)+'h'];let _0x45381c=0x0,_0x38da44=0x0;for(let _0x5e9577=0x0;_0x4302ae[_0xc739b8(0x255)](_0x5e9577,_0x4290ab[_0xc739b8(0x1c8)+'h']);_0x5e9577++){_0x45381c+=_0x4302ae[_0xc739b8(0x1bd)](_0x4302ae[_0xc739b8(0x29e)](_0x4290ab[_0x5e9577],_0x3bb11),_0x4302ae[_0xc739b8(0x29e)](_0x58078a[_0x5e9577],_0x5e24ea)),_0x38da44+=_0x543572[_0xc739b8(0x2af)](_0x4302ae[_0xc739b8(0x2c1)](_0x58078a[_0x5e9577],_0x5e24ea),0x2);}_0x45381c/=_0x4290ab[_0xc739b8(0x1c8)+'h'],_0x38da44/=_0x4290ab[_0xc739b8(0x1c8)+'h'];if(_0x4302ae[_0xc739b8(0x1e6)](_0x38da44,0.0001))return 0x0;return _0x1cc4d7[_0xc739b8(0x1c3)](_0x4302ae[_0xc739b8(0x1c6)](_0x45381c,_0x38da44));}else{_0x2f2f3f=_0xc739b8(0x1e3);const _0x248fc4={};_0x248fc4[_0xc739b8(0x1c0)+'ultip'+_0xc739b8(0x23f)]=1.3,_0x248fc4[_0xc739b8(0x201)+_0xc739b8(0x22d)+_0xc739b8(0x2aa)+'r']=1.2,_0x248fc4[_0xc739b8(0x1e2)+_0xc739b8(0x23b)+_0xc739b8(0x23d)]=0x2,_0x248fc4[_0xc739b8(0x1eb)+'dence'+_0xc739b8(0x28c)]=-0.05,_0x5914d8=_0x248fc4;}}}const _0x1de1f0={};return _0x1de1f0['regim'+'e']=_0x2f2f3f,_0x1de1f0[_0xc739b8(0x287)+'s']=_0x5914d8,_0x1de1f0;}['_calc'+_0x5591bb(0x1c2)+_0x5591bb(0x1fd)](_0x1d316f,_0x5ef546=0xe){const _0x51638a=_0x5591bb,_0x2cbefb={};_0x2cbefb[_0x51638a(0x1b5)]=function(_0x587308,_0x280220){return _0x587308<_0x280220;},_0x2cbefb[_0x51638a(0x204)]=function(_0x2dbeb1,_0x38ae7d){return _0x2dbeb1+_0x38ae7d;},_0x2cbefb[_0x51638a(0x2ba)]=function(_0x3aeaa0,_0x282ff9){return _0x3aeaa0-_0x282ff9;},_0x2cbefb['KhiEZ']=function(_0x1b0db8,_0x106fb3){return _0x1b0db8-_0x106fb3;},_0x2cbefb['KMxiS']=function(_0x1753c6,_0x379e24){return _0x1753c6-_0x379e24;};const _0x41cb1b=_0x2cbefb;if(_0x41cb1b[_0x51638a(0x1b5)](_0x1d316f[_0x51638a(0x1c8)+'h'],_0x41cb1b['MgDDA'](_0x5ef546,0x1)))return 2.5;const _0x17f314=[];for(let _0x53d012=_0x41cb1b['umHPF'](_0x1d316f['lengt'+'h'],_0x5ef546);_0x41cb1b[_0x51638a(0x1b5)](_0x53d012,_0x1d316f[_0x51638a(0x1c8)+'h']);_0x53d012++){const _0x2d30c6=_0x1d316f[_0x53d012],_0x4acb6f=_0x1d316f[_0x41cb1b['KhiEZ'](_0x53d012,0x1)][_0x51638a(0x283)],_0x25ece4=Math[_0x51638a(0x1ec)](_0x41cb1b[_0x51638a(0x1d0)](_0x2d30c6[_0x51638a(0x1e3)],_0x2d30c6[_0x51638a(0x239)]),Math[_0x51638a(0x1c3)](_0x41cb1b[_0x51638a(0x299)](_0x2d30c6[_0x51638a(0x1e3)],_0x4acb6f)),Math['abs'](_0x41cb1b[_0x51638a(0x1d0)](_0x2d30c6[_0x51638a(0x239)],_0x4acb6f)));_0x17f314[_0x51638a(0x2be)](_0x25ece4);}return _0x17f314[_0x51638a(0x1de)+'e']((_0x4e9ed0,_0xb77d1f)=>_0x4e9ed0+_0xb77d1f,0x0)/_0x17f314[_0x51638a(0x1c8)+'h'];}['_comp'+'uteOr'+'derFl'+_0x5591bb(0x2b7)+_0x5591bb(0x1aa)+'e'](_0x14e745){const _0xedbfdd=_0x5591bb,_0x110db8={};_0x110db8['zblhm']='7|1|2'+_0xedbfdd(0x1d4)+_0xedbfdd(0x258)+_0xedbfdd(0x1ed),_0x110db8[_0xedbfdd(0x26a)]=_0xedbfdd(0x192),_0x110db8[_0xedbfdd(0x228)]=function(_0x16399a,_0x2799bf){return _0x16399a/_0x2799bf;},_0x110db8['KHlMA']=function(_0x36e96a,_0x425b8e){return _0x36e96a-_0x425b8e;},_0x110db8[_0xedbfdd(0x2c9)]=function(_0x189813,_0x37ae35){return _0x189813*_0x37ae35;},_0x110db8[_0xedbfdd(0x288)]=function(_0x514d09,_0x54c7c0){return _0x514d09-_0x54c7c0;},_0x110db8[_0xedbfdd(0x1cb)]=function(_0x2b026b,_0x1f261f){return _0x2b026b+_0x1f261f;};const _0x1cc26b=_0x110db8;if(_0x14e745[_0xedbfdd(0x1c8)+'h']<this[_0xedbfdd(0x29b)+'okbac'+'k'])return 0x0;const _0x3acced=_0x14e745[_0xedbfdd(0x2b8)](-this['ofiLo'+_0xedbfdd(0x194)+'k']);let _0x5efd91=0x0,_0x48f614=0x0;for(const _0x5b77f0 of _0x3acced){if(_0x1cc26b['AKdnn']!=='EMNMM'){const _0xd6e278=_0x1cc26b['zblhm'][_0xedbfdd(0x2c6)]('|');let _0x5a396b=0x0;while(!![]){switch(_0xd6e278[_0x5a396b++]){case'0':this['price'+'Buffe'+'r']['set'](_0x8fba53,[]);continue;case'1':this['tickV'+_0xedbfdd(0x188)]=_0x32f35b;continue;case'2':this[_0xedbfdd(0x2ae)+_0xedbfdd(0x1d9)][_0xedbfdd(0x24e)](_0x39e37e,[]);continue;case'3':const _0x44b5e2={};_0x44b5e2[_0xedbfdd(0x248)+'ate']=0x0,_0x44b5e2['error'+'Covar'+'iance']=0x1,this[_0xedbfdd(0x1f6)+_0xedbfdd(0x214)+'es'][_0xedbfdd(0x24e)](_0x2414c3,_0x44b5e2);continue;case'4':this[_0xedbfdd(0x185)+_0xedbfdd(0x19b)][_0xedbfdd(0x24e)](_0x11afc5,[]);continue;case'5':this[_0xedbfdd(0x199)+_0xedbfdd(0x28e)+'er'][_0xedbfdd(0x24e)](_0x3c32d9,[]);continue;case'6':this[_0xedbfdd(0x2b9)+_0xedbfdd(0x1d9)]['set'](_0x2e0c61,[]);continue;case'7':this[_0xedbfdd(0x221)+_0xedbfdd(0x25a)]=_0x362ccc;continue;case'8':this[_0xedbfdd(0x293)+_0xedbfdd(0x25e)+'e']['set'](_0x17107a,0x0);continue;case'9':this['volum'+_0xedbfdd(0x19f)+'er'][_0xedbfdd(0x24e)](_0x3b60e0,[]);continue;}break;}}else{const _0x4e06d3=_0x5b77f0['high']-_0x5b77f0[_0xedbfdd(0x239)];if(_0x4e06d3>0x0){const _0x48f0c6=_0x1cc26b[_0xedbfdd(0x228)](_0x1cc26b[_0xedbfdd(0x187)](_0x5b77f0[_0xedbfdd(0x283)],_0x5b77f0[_0xedbfdd(0x239)]),_0x4e06d3);_0x5efd91+=_0x1cc26b[_0xedbfdd(0x2c9)](_0x48f0c6,_0x5b77f0[_0xedbfdd(0x2a2)+'e']),_0x48f614+=_0x1cc26b[_0xedbfdd(0x2c9)](_0x1cc26b['rLrkX'](0x1,_0x48f0c6),_0x5b77f0[_0xedbfdd(0x2a2)+'e']);}}}const _0x115596=_0x1cc26b[_0xedbfdd(0x1cb)](_0x5efd91,_0x48f614);if(_0x115596<0x1)return 0x0;return(_0x5efd91-_0x48f614)/_0x115596;}[_0x5591bb(0x1a8)+_0x5591bb(0x24a)+_0x5591bb(0x245)](_0x523cf6,_0x4738e7,_0x2a0a8c,_0x5ad095,_0x1ac9fa,_0x371819,_0x21a025,_0xafcde7,_0x5de6d7,_0x1f8c82){const _0x364a3d=_0x5591bb,_0x343f36={'cxxwk':function(_0x5212e5,_0x5490f8){return _0x5212e5/_0x5490f8;},'Yedmv':function(_0x530792,_0x49b2bb){return _0x530792<_0x49b2bb;},'KRDaD':function(_0x227b72,_0x1e59c7){return _0x227b72>_0x1e59c7;},'IcDJX':_0x364a3d(0x240),'QXGPQ':_0x364a3d(0x22a),'qzsPo':function(_0x49e8b6,_0x3bf00c){return _0x49e8b6===_0x3bf00c;},'DyZeW':function(_0x274fa0,_0x2c1a0a){return _0x274fa0>_0x2c1a0a;},'rTBcG':function(_0x54033d,_0x4c2124){return _0x54033d<_0x4c2124;},'zMmpA':function(_0x3859f1,_0x5308ae){return _0x3859f1-_0x5308ae;},'rqigq':function(_0x2ebaa4,_0x1d4c8a){return _0x2ebaa4===_0x1d4c8a;},'Ocfgg':function(_0x246ac2,_0x51df60){return _0x246ac2===_0x51df60;},'wULLC':function(_0x34cad2,_0x13e636){return _0x34cad2+_0x13e636;},'nJSov':function(_0x348594,_0x59ad0e){return _0x348594+_0x59ad0e;},'UXXwl':function(_0x528405,_0x2509e7){return _0x528405+_0x2509e7;},'PJZoU':function(_0x1893a6,_0x1cd74f){return _0x1893a6*_0x1cd74f;},'WkpWv':function(_0x5a1d0d,_0x60da63){return _0x5a1d0d*_0x60da63;},'AffrO':function(_0x36f4a6,_0x22c63a){return _0x36f4a6*_0x22c63a;},'oyOfz':function(_0xcee6f6,_0x2e1dc4){return _0xcee6f6+_0x2e1dc4;},'KUwBN':function(_0x6228ec,_0x599efc){return _0x6228ec*_0x599efc;},'DMSTO':function(_0x515f68,_0x14491f){return _0x515f68+_0x14491f;},'iHRGm':function(_0x60dbb1,_0x4bde5c){return _0x60dbb1*_0x4bde5c;},'sEOHc':function(_0x3c8c41,_0x3c046b){return _0x3c8c41*_0x3c046b;},'eIUUA':function(_0x413410,_0x20a28d){return _0x413410-_0x20a28d;},'aFScO':function(_0x26dc26,_0x343737){return _0x26dc26*_0x343737;},'VInIz':function(_0x5bf947,_0x24bbb0){return _0x5bf947*_0x24bbb0;},'XUVkC':function(_0x104b84,_0xb085fd){return _0x104b84>=_0xb085fd;},'CRLag':function(_0x51d265,_0x1d306d){return _0x51d265+_0x1d306d;},'rQbIx':function(_0xd91da7){return _0xd91da7();},'oFGyb':_0x364a3d(0x217)+'LTRA_'+'SCALP'+_0x364a3d(0x203)},_0x5e7b76=Math[_0x364a3d(0x1c3)](_0x2a0a8c);if(_0x343f36[_0x364a3d(0x211)](_0x5e7b76,_0xafcde7[_0x364a3d(0x1e2)+'eThre'+_0x364a3d(0x23d)]))return null;if(_0x343f36[_0x364a3d(0x191)](_0x5ad095,this[_0x364a3d(0x198)+_0x364a3d(0x1e5)+_0x364a3d(0x1ba)+_0x364a3d(0x1a7)]))return null;let _0x2f8677;if(_0x343f36[_0x364a3d(0x211)](_0x2a0a8c,-_0xafcde7['zscor'+_0x364a3d(0x23b)+_0x364a3d(0x23d)]))_0x2f8677=_0x343f36['IcDJX'];else{if(_0x2a0a8c>_0xafcde7[_0x364a3d(0x1e2)+_0x364a3d(0x23b)+_0x364a3d(0x23d)])_0x2f8677=_0x343f36[_0x364a3d(0x1cd)];else return null;}const _0x21231f=_0x343f36['qzsPo'](_0x2f8677,_0x364a3d(0x240))&&_0x343f36[_0x364a3d(0x1cf)](_0x5de6d7,0.1)||_0x2f8677===_0x343f36[_0x364a3d(0x1cd)]&&_0x343f36['rTBcG'](_0x5de6d7,-0.1),_0x510cd3=_0x343f36[_0x364a3d(0x1dc)](_0x4738e7,_0x371819),_0x2bd641=_0x2f8677===_0x343f36['IcDJX']&&_0x343f36[_0x364a3d(0x1b7)](_0x510cd3,0x0)||_0x343f36[_0x364a3d(0x2d0)](_0x2f8677,_0x343f36['QXGPQ'])&&_0x343f36[_0x364a3d(0x191)](_0x510cd3,0x0),_0x29092c={'zscore':Math['min'](0x1,_0x343f36[_0x364a3d(0x2c2)](_0x5e7b76,0x4)),'vpin':0x1-_0x5ad095,'kyleLambda':_0x1ac9fa>0.001?0.5:0.8,'kalman':_0x2bd641?0.8:0.4,'volatility':_0x343f36[_0x364a3d(0x2d0)](_0x21a025,_0x364a3d(0x244)+'l')?0.8:_0x343f36['Ocfgg'](_0x21a025,_0x364a3d(0x239))?0.7:0.6,'ofi':_0x21231f?0.9:0.5,'composite':0x0};_0x29092c['compo'+_0x364a3d(0x1e9)]=_0x343f36[_0x364a3d(0x294)](_0x343f36[_0x364a3d(0x1a1)](_0x343f36[_0x364a3d(0x1fe)](_0x343f36[_0x364a3d(0x1fe)](_0x343f36['nJSov'](_0x343f36[_0x364a3d(0x218)](_0x29092c[_0x364a3d(0x1e2)+'e'],0.3),_0x29092c['vpin']*0.15),_0x343f36[_0x364a3d(0x218)](_0x29092c['kyleL'+_0x364a3d(0x18a)],0.1)),_0x343f36[_0x364a3d(0x218)](_0x29092c[_0x364a3d(0x1f6)+'n'],0.15)),_0x343f36['WkpWv'](_0x29092c['volat'+'ility'],0.1)),_0x343f36['WkpWv'](_0x29092c[_0x364a3d(0x279)],0.2));const _0x42fb66=Math[_0x364a3d(0x21c)](0x1,_0x29092c[_0x364a3d(0x1f9)+'site']+_0xafcde7[_0x364a3d(0x1eb)+_0x364a3d(0x236)+_0x364a3d(0x28c)]);if(_0x343f36[_0x364a3d(0x1b7)](_0x42fb66,0.55))return null;const _0x535f27=Math[_0x364a3d(0x209)](_0x343f36[_0x364a3d(0x21f)](this['baseS'+_0x364a3d(0x1df)+'cks'],_0xafcde7[_0x364a3d(0x1c0)+_0x364a3d(0x1f5)+_0x364a3d(0x23f)])),_0x21a94b=Math[_0x364a3d(0x209)](this[_0x364a3d(0x1db)+_0x364a3d(0x21e)+'Ticks']*_0xafcde7[_0x364a3d(0x201)+_0x364a3d(0x22d)+_0x364a3d(0x2aa)+'r']),_0x36bbea=Math[_0x364a3d(0x1ec)](0x6,Math[_0x364a3d(0x21c)](0xc,_0x535f27)),_0x292844=Math['max'](_0x343f36[_0x364a3d(0x2b4)](_0x36bbea,1.5),Math[_0x364a3d(0x21c)](0x18,_0x21a94b));let _0x2b1cee,_0x141997,_0x140e91,_0xac010d;_0x343f36[_0x364a3d(0x2c5)](_0x2f8677,_0x343f36[_0x364a3d(0x182)])?(_0x2b1cee=_0x4738e7-_0x343f36['AffrO'](_0x36bbea,this[_0x364a3d(0x221)+_0x364a3d(0x25a)]),_0x141997=_0x343f36[_0x364a3d(0x295)](_0x4738e7,_0x343f36[_0x364a3d(0x18b)](_0x292844,this[_0x364a3d(0x221)+_0x364a3d(0x25a)])),_0x140e91=_0x343f36[_0x364a3d(0x272)](_0x4738e7,_0x343f36[_0x364a3d(0x18b)](this[_0x364a3d(0x1d8)+_0x364a3d(0x1b8)+_0x364a3d(0x275)],this[_0x364a3d(0x221)+_0x364a3d(0x25a)])),_0xac010d=_0x4738e7+_0x343f36['iHRGm'](_0x292844,this[_0x364a3d(0x227)+'tLock'+_0x364a3d(0x265)])*this[_0x364a3d(0x221)+_0x364a3d(0x25a)]):'TKyth'!==_0x364a3d(0x2ab)?_0x36f2f3=_0x343f36[_0x364a3d(0x2c2)](_0x241fc4[_0x364a3d(0x200)+'r'](_0x1ddf06=>_0x1ddf06<=_0xc84660)[_0x364a3d(0x1c8)+'h'],_0x26907a[_0x364a3d(0x1c8)+'h']):(_0x2b1cee=_0x343f36[_0x364a3d(0x1a1)](_0x4738e7,_0x343f36[_0x364a3d(0x18b)](_0x36bbea,this[_0x364a3d(0x221)+_0x364a3d(0x25a)])),_0x141997=_0x343f36[_0x364a3d(0x1dc)](_0x4738e7,_0x343f36['sEOHc'](_0x292844,this[_0x364a3d(0x221)+_0x364a3d(0x25a)])),_0x140e91=_0x343f36[_0x364a3d(0x1a2)](_0x4738e7,_0x343f36['aFScO'](this['break'+'evenT'+'icks'],this['tickS'+_0x364a3d(0x25a)])),_0xac010d=_0x4738e7-_0x343f36['WkpWv'](_0x343f36[_0x364a3d(0x1e0)](_0x292844,this['profi'+_0x364a3d(0x1d7)+_0x364a3d(0x265)]),this['tickS'+_0x364a3d(0x25a)]));const _0x29603b=_0x292844/_0x36bbea,_0x1a1b19=Math['round'](_0x343f36[_0x364a3d(0x1d3)](_0x292844,0.5)),_0x15fdba=Math[_0x364a3d(0x209)](_0x343f36[_0x364a3d(0x18b)](_0x36bbea,0.4));let _0x36d4a0=SignalStrength[_0x364a3d(0x205)+_0x364a3d(0x25f)];if(_0x343f36['XUVkC'](_0x42fb66,0.85))_0x36d4a0=SignalStrength[_0x364a3d(0x207)+'STRON'+'G'];else{if(_0x42fb66>=0.75)_0x36d4a0=SignalStrength[_0x364a3d(0x196)+'G'];else{if(_0x343f36['rTBcG'](_0x42fb66,0.6))_0x36d4a0=SignalStrength['WEAK'];}}const _0xfd9b27=_0x343f36[_0x364a3d(0x23a)](0.5,(_0x42fb66-0.5)*0.4),_0x5d43f=_0x343f36[_0x364a3d(0x1dc)](_0xfd9b27*Math[_0x364a3d(0x1c3)](_0x343f36['zMmpA'](_0x141997,_0x4738e7)),_0x343f36[_0x364a3d(0x1dc)](0x1,_0xfd9b27)*Math[_0x364a3d(0x1c3)](_0x343f36[_0x364a3d(0x1dc)](_0x4738e7,_0x2b1cee)));return{'id':_0x343f36[_0x364a3d(0x1da)](uuidv4),'timestamp':Date[_0x364a3d(0x1b0)](),'symbol':extractBaseSymbol(_0x523cf6),'contractId':_0x523cf6,'side':_0x343f36['qzsPo'](_0x2f8677,_0x343f36['IcDJX'])?OrderSide[_0x364a3d(0x19e)]:OrderSide[_0x364a3d(0x1b9)],'direction':_0x2f8677,'strategy':_0x343f36[_0x364a3d(0x2cd)],'strength':_0x36d4a0,'edge':_0x5d43f,'confidence':_0x42fb66,'entry':_0x4738e7,'entryPrice':_0x4738e7,'stopLoss':_0x2b1cee,'takeProfit':_0x141997,'riskReward':_0x29603b,'stopTicks':_0x36bbea,'targetTicks':_0x292844,'trailTriggerTicks':_0x1a1b19,'trailDistanceTicks':_0x15fdba,'beBreakeven':_0x140e91,'profitLockLevel':_0xac010d,'zScore':_0x2a0a8c,'zScoreExit':this[_0x364a3d(0x1e2)+_0x364a3d(0x1b2)+_0x364a3d(0x22c)+_0x364a3d(0x195)],'vpinValue':_0x5ad095,'kyleLambda':_0x1ac9fa,'kalmanEstimate':_0x371819,'volatilityRegime':_0x21a025,'ofiValue':_0x5de6d7,'models':_0x29092c};}[_0x5591bb(0x298)+'dExit'+_0x5591bb(0x2cb)+_0x5591bb(0x2bb)](_0x19159c){const _0x48b602=_0x5591bb,_0x58446d={};_0x58446d[_0x48b602(0x2a4)]=function(_0x1889cf,_0x22334f){return _0x1889cf<_0x22334f;};const _0x5d2b5d=_0x58446d,_0x4ede28=this[_0x48b602(0x21a)+_0x48b602(0x24d)+'r'][_0x48b602(0x1a0)](_0x19159c);if(!_0x4ede28||_0x4ede28[_0x48b602(0x1c8)+'h']<0x32)return![];const _0x4672b7=this['_comp'+_0x48b602(0x25d)+'core'](_0x4ede28);return _0x5d2b5d[_0x48b602(0x2a4)](Math[_0x48b602(0x1c3)](_0x4672b7),this[_0x48b602(0x1e2)+_0x48b602(0x1b2)+_0x48b602(0x22c)+_0x48b602(0x195)]);}[_0x5591bb(0x1ff)+_0x5591bb(0x2b5)+_0x5591bb(0x27b)](_0x4dc076){const _0x57d37e=_0x5591bb,_0x5e5b86={};_0x5e5b86[_0x57d37e(0x18f)]=function(_0x1fd6b2,_0x2a4127){return _0x1fd6b2||_0x2a4127;},_0x5e5b86['iPYDL']=function(_0x57a98b,_0x183735){return _0x57a98b<_0x183735;},_0x5e5b86[_0x57d37e(0x2bf)]=function(_0x4fdda2,_0x273b70){return _0x4fdda2+_0x273b70;},_0x5e5b86[_0x57d37e(0x2cf)]=function(_0x35e764,_0x34f3a5){return _0x35e764*_0x34f3a5;},_0x5e5b86[_0x57d37e(0x1a4)]=function(_0x55a4b5,_0x54cb48){return _0x55a4b5+_0x54cb48;};const _0x14f9b1=_0x5e5b86,_0x53e245=this[_0x57d37e(0x21a)+_0x57d37e(0x24d)+'r'][_0x57d37e(0x1a0)](_0x4dc076),_0xf3125=this['volum'+'eBuff'+'er'][_0x57d37e(0x1a0)](_0x4dc076),_0x4a9838=this[_0x57d37e(0x2ae)+_0x57d37e(0x1d9)][_0x57d37e(0x1a0)](_0x4dc076);if(_0x14f9b1['lQquE'](!_0x53e245,!_0xf3125)||!_0x4a9838||_0x14f9b1['iPYDL'](_0x4a9838[_0x57d37e(0x1c8)+'h'],0x32))return null;return{'zscore':this[_0x57d37e(0x1af)+'uteZS'+_0x57d37e(0x1e7)](_0x53e245)[_0x57d37e(0x289)+'ed'](0x2),'vpin':_0x14f9b1['fagdA'](_0x14f9b1['CQCGV'](this[_0x57d37e(0x1af)+'uteVP'+'IN'](_0xf3125),0x64)[_0x57d37e(0x289)+'ed'](0x1),'%'),'ofi':_0x14f9b1[_0x57d37e(0x1a4)]((this[_0x57d37e(0x1af)+_0x57d37e(0x2a1)+_0x57d37e(0x276)+'owImb'+_0x57d37e(0x1aa)+'e'](_0x4a9838)*0x64)[_0x57d37e(0x289)+'ed'](0x1),'%'),'bars':_0x4a9838[_0x57d37e(0x1c8)+'h']};}[_0x5591bb(0x24b)+'dTrad'+_0x5591bb(0x1b1)+'lt'](_0x4349f0){const _0x48fc24=_0x5591bb,_0x75edfc={};_0x75edfc[_0x48fc24(0x2c7)]=function(_0x2e659c,_0x4462eb){return _0x2e659c>_0x4462eb;},_0x75edfc[_0x48fc24(0x18c)]=function(_0x1af998,_0xa874f4){return _0x1af998>_0xa874f4;},_0x75edfc['EKroj']=function(_0x2de3d8,_0x334306){return _0x2de3d8!==_0x334306;},_0x75edfc[_0x48fc24(0x23e)]=_0x48fc24(0x274),_0x75edfc[_0x48fc24(0x238)]=_0x48fc24(0x1f8);const _0x5f2c9e=_0x75edfc;this[_0x48fc24(0x1f7)+_0x48fc24(0x1f1)+'es'][_0x48fc24(0x2be)]({'pnl':_0x4349f0,'timestamp':Date[_0x48fc24(0x1b0)]()});if(_0x5f2c9e['ZzGXo'](this[_0x48fc24(0x1f7)+'tTrad'+'es'][_0x48fc24(0x1c8)+'h'],0x64))this[_0x48fc24(0x1f7)+_0x48fc24(0x1f1)+'es']['shift']();_0x5f2c9e[_0x48fc24(0x18c)](_0x4349f0,0x0)?(this[_0x48fc24(0x247)+_0x48fc24(0x2c3)]++,this[_0x48fc24(0x20b)+_0x48fc24(0x1ef)]=0x0):_0x5f2c9e[_0x48fc24(0x20d)](_0x5f2c9e[_0x48fc24(0x23e)],_0x5f2c9e[_0x48fc24(0x238)])?(this[_0x48fc24(0x20b)+_0x48fc24(0x1ef)]++,this['winSt'+_0x48fc24(0x2c3)]=0x0):(this[_0x48fc24(0x20b)+_0x48fc24(0x1ef)]++,this[_0x48fc24(0x247)+_0x48fc24(0x2c3)]=0x0);}[_0x5591bb(0x2a7)+_0x5591bb(0x28a)+_0x5591bb(0x1c7)](_0x2f4446){const _0x345ae1=_0x5591bb;return this[_0x345ae1(0x2ae)+'story'][_0x345ae1(0x1a0)](_0x2f4446)||[];}[_0x5591bb(0x2d1)](_0x52f8e7){const _0x136351=_0x5591bb,_0xaa555e={};_0xaa555e[_0x136351(0x20e)]=_0x136351(0x225)+_0x136351(0x1a5)+'0|4|5';const _0x6498b0=_0xaa555e,_0x5b7b07=_0x6498b0[_0x136351(0x20e)][_0x136351(0x2c6)]('|');let _0x28b4ee=0x0;while(!![]){switch(_0x5b7b07[_0x28b4ee++]){case'0':this[_0x136351(0x185)+_0x136351(0x19b)]['set'](_0x52f8e7,[]);continue;case'1':this[_0x136351(0x2ae)+_0x136351(0x1d9)]['set'](_0x52f8e7,[]);continue;case'2':this[_0x136351(0x199)+_0x136351(0x28e)+'er'][_0x136351(0x24e)](_0x52f8e7,[]);continue;case'3':this['atrHi'+_0x136351(0x1d9)][_0x136351(0x24e)](_0x52f8e7,[]);continue;case'4':this[_0x136351(0x293)+'arTim'+'e'][_0x136351(0x24e)](_0x52f8e7,0x0);continue;case'5':const _0x498557={};_0x498557[_0x136351(0x248)+'ate']=0x0,_0x498557['error'+_0x136351(0x186)+_0x136351(0x267)]=0x1,this['kalma'+'nStat'+'es'][_0x136351(0x24e)](_0x52f8e7,_0x498557);continue;case'6':this['volum'+_0x136351(0x19f)+'er'][_0x136351(0x24e)](_0x52f8e7,[]);continue;case'7':this[_0x136351(0x21a)+'Buffe'+'r'][_0x136351(0x24e)](_0x52f8e7,[]);continue;}break;}}}const M1=new HQXUltraScalpingStrategy(),_0x9469cf={};_0x9469cf['M1']=M1,_0x9469cf[_0x5591bb(0x2a6)+_0x5591bb(0x2c0)+'alpin'+'gStra'+'tegy']=HQXUltraScalpingStrategy,_0x9469cf[_0x5591bb(0x1ac)+'Side']=OrderSide,_0x9469cf[_0x5591bb(0x27c)+'lStre'+_0x5591bb(0x2b0)]=SignalStrength,module[_0x5591bb(0x256)+'ts']=_0x9469cf;
|