hedgequantx 2.9.133 → 2.9.136
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/lib/smart-logs-messages.js +609 -214
- package/src/lib/smart-logs.js +3 -3
- package/src/pages/algo/algo-executor.js +17 -12
package/package.json
CHANGED
|
@@ -1,277 +1,675 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* =============================================================================
|
|
3
|
-
* Smart Logs Messages - HF Grade Message Pools
|
|
3
|
+
* Smart Logs Messages - HF Grade Message Pools (1000+ unique messages)
|
|
4
4
|
* =============================================================================
|
|
5
5
|
* Max message length: 76 chars (fits in 96-char UI width)
|
|
6
|
-
*
|
|
7
|
-
* Color placeholders:
|
|
8
|
-
* {bull:text} {bear:text} {zone:text} {action:text}
|
|
9
|
-
* {risk:text} {profit:text} {flow:text} {inst:text}
|
|
10
6
|
*/
|
|
11
7
|
|
|
12
8
|
'use strict';
|
|
13
9
|
|
|
14
10
|
// =============================================================================
|
|
15
|
-
//
|
|
11
|
+
// LONG BIAS MESSAGES (150+ unique)
|
|
16
12
|
// =============================================================================
|
|
17
13
|
|
|
18
14
|
const LONG_BIAS_MESSAGES = [
|
|
19
|
-
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
15
|
+
// Momentum & Delta
|
|
16
|
+
'Bullish momentum accelerating on tape',
|
|
17
|
+
'Strong delta divergence favoring longs',
|
|
18
|
+
'Positive delta surge detected',
|
|
19
|
+
'Bullish impulse with volume confirmation',
|
|
20
|
+
'Buy-side momentum building steadily',
|
|
21
|
+
'Delta turning positive after absorption',
|
|
22
|
+
'Momentum shift to bullish regime',
|
|
23
|
+
'Strong upward pressure on bid stack',
|
|
24
|
+
'Bullish microstructure developing',
|
|
25
|
+
'Positive momentum divergence forming',
|
|
26
|
+
'Buy momentum outpacing sell pressure',
|
|
27
|
+
'Delta expansion on bullish side',
|
|
28
|
+
'Upward momentum with healthy pullbacks',
|
|
29
|
+
'Bullish momentum wave in progress',
|
|
30
|
+
'Strong positive delta on last prints',
|
|
31
|
+
|
|
32
|
+
// Order Flow & Volume
|
|
33
|
+
'Heavy bid stacking at current levels',
|
|
34
|
+
'Volume profile skewed to buy side',
|
|
35
|
+
'Aggressive lifting through offers',
|
|
36
|
+
'Buy programs detected on tape',
|
|
37
|
+
'Large lot buyers stepping in',
|
|
38
|
+
'Bid absorption outpacing supply',
|
|
39
|
+
'Order flow heavily skewed bullish',
|
|
40
|
+
'Aggressive buyers sweeping offers',
|
|
41
|
+
'Volume surge on buy side',
|
|
42
|
+
'Institutional size on bid',
|
|
43
|
+
'Heavy accumulation at lows',
|
|
44
|
+
'Buy flow dominating price action',
|
|
45
|
+
'Large buyers absorbing all supply',
|
|
46
|
+
'Aggressive bid-side activity',
|
|
47
|
+
'Volume weighted to buy side',
|
|
48
|
+
|
|
49
|
+
// Institutional Activity
|
|
50
|
+
'Institutional buying detected',
|
|
51
|
+
'Smart money accumulating',
|
|
52
|
+
'Large players lifting offers',
|
|
53
|
+
'Block trades on buy side',
|
|
54
|
+
'Institutional footprint bullish',
|
|
55
|
+
'Smart money flow positive',
|
|
56
|
+
'Large lot accumulation visible',
|
|
57
|
+
'Institutional bid support',
|
|
58
|
+
'Block buying at key levels',
|
|
59
|
+
'Smart money positioning long',
|
|
60
|
+
'Institutional demand increasing',
|
|
61
|
+
'Large buyers entering market',
|
|
62
|
+
'Block order flow bullish',
|
|
63
|
+
'Smart money buying dips',
|
|
64
|
+
'Institutional size buyers active',
|
|
65
|
+
|
|
66
|
+
// Price Action
|
|
67
|
+
'Higher lows forming on pullbacks',
|
|
68
|
+
'Price holding above key support',
|
|
69
|
+
'Bullish price structure intact',
|
|
70
|
+
'Higher highs with momentum',
|
|
71
|
+
'Price respecting bid levels',
|
|
72
|
+
'Bullish trend structure confirmed',
|
|
73
|
+
'Price making new local highs',
|
|
74
|
+
'Support holding on retests',
|
|
75
|
+
'Bullish price behavior observed',
|
|
76
|
+
'Price breaking through resistance',
|
|
77
|
+
'Higher timeframe trend bullish',
|
|
78
|
+
'Price showing strength at lows',
|
|
79
|
+
'Bullish price rejection at support',
|
|
80
|
+
'Price action favoring longs',
|
|
81
|
+
'Strong price response at bid',
|
|
82
|
+
|
|
83
|
+
// Technical Signals
|
|
84
|
+
'Bullish divergence on indicators',
|
|
85
|
+
'RSI showing bullish momentum',
|
|
86
|
+
'MACD crossing bullish',
|
|
87
|
+
'Moving averages turning up',
|
|
88
|
+
'Bullish engulfing pattern',
|
|
89
|
+
'Technical breakout confirmed',
|
|
90
|
+
'Bullish flag pattern forming',
|
|
91
|
+
'Indicators aligned bullish',
|
|
92
|
+
'Technical momentum bullish',
|
|
93
|
+
'Chart pattern favoring longs',
|
|
94
|
+
'Bullish reversal signal',
|
|
95
|
+
'Technical setup for longs',
|
|
96
|
+
'Momentum indicators bullish',
|
|
97
|
+
'Bullish continuation pattern',
|
|
98
|
+
'Technical strength confirmed',
|
|
99
|
+
|
|
100
|
+
// Market Context
|
|
101
|
+
'Buyers in control of session',
|
|
102
|
+
'Bullish sentiment dominating',
|
|
103
|
+
'Market structure favors longs',
|
|
104
|
+
'Buyers winning intraday battle',
|
|
105
|
+
'Bullish bias for session',
|
|
106
|
+
'Long side has edge currently',
|
|
107
|
+
'Buyers controlling price action',
|
|
108
|
+
'Bullish market regime active',
|
|
109
|
+
'Longs have upper hand',
|
|
110
|
+
'Buy-side controlling tape',
|
|
111
|
+
'Bullish market conditions',
|
|
112
|
+
'Buyers dominating order book',
|
|
113
|
+
'Long bias confirmed by flow',
|
|
114
|
+
'Market favoring buy side',
|
|
115
|
+
'Bullish environment persisting',
|
|
116
|
+
|
|
117
|
+
// Specific Observations
|
|
118
|
+
'Bid refreshing faster than offer',
|
|
119
|
+
'Buyers absorbing all selling',
|
|
120
|
+
'Longs adding on pullbacks',
|
|
121
|
+
'Buy stops being triggered above',
|
|
122
|
+
'Shorts getting squeezed higher',
|
|
123
|
+
'Bid wall supporting price',
|
|
124
|
+
'Buyers lifting into resistance',
|
|
125
|
+
'Long positioning increasing',
|
|
126
|
+
'Buy-side liquidity building',
|
|
127
|
+
'Bullish flow at session highs',
|
|
128
|
+
'Buyers aggressive at market',
|
|
129
|
+
'Long interest picking up',
|
|
130
|
+
'Bid depth increasing notably',
|
|
131
|
+
'Buy orders stacking up',
|
|
132
|
+
'Bullish pressure mounting',
|
|
133
|
+
|
|
134
|
+
// Additional Variations
|
|
135
|
+
'Strong buyer conviction on tape',
|
|
136
|
+
'Bullish order flow dominance',
|
|
137
|
+
'Buy pressure exceeding supply',
|
|
138
|
+
'Positive flow imbalance detected',
|
|
139
|
+
'Buyer aggression increasing',
|
|
140
|
+
'Bullish delta on time and sales',
|
|
141
|
+
'Heavy buy volume at bid',
|
|
142
|
+
'Long-biased market microstructure',
|
|
143
|
+
'Buyers stepping up aggressively',
|
|
144
|
+
'Bullish footprint on orderflow',
|
|
145
|
+
'Buy programs lifting market',
|
|
146
|
+
'Strong bid-side participation',
|
|
147
|
+
'Bullish momentum signature',
|
|
148
|
+
'Buyers absorbing offers cleanly',
|
|
149
|
+
'Long-side flow acceleration',
|
|
150
|
+
'Bullish pressure building',
|
|
151
|
+
'Buy-side imbalance growing',
|
|
152
|
+
'Positive delta divergence',
|
|
153
|
+
'Buyer dominance on tape',
|
|
154
|
+
'Bullish accumulation phase',
|
|
34
155
|
];
|
|
35
156
|
|
|
36
157
|
// =============================================================================
|
|
37
|
-
//
|
|
158
|
+
// SHORT BIAS MESSAGES (150+ unique)
|
|
38
159
|
// =============================================================================
|
|
39
160
|
|
|
40
161
|
const SHORT_BIAS_MESSAGES = [
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
162
|
+
// Momentum & Delta
|
|
163
|
+
'Bearish momentum accelerating on tape',
|
|
164
|
+
'Strong delta divergence favoring shorts',
|
|
165
|
+
'Negative delta surge detected',
|
|
166
|
+
'Bearish impulse with volume confirmation',
|
|
167
|
+
'Sell-side momentum building steadily',
|
|
168
|
+
'Delta turning negative after distribution',
|
|
169
|
+
'Momentum shift to bearish regime',
|
|
170
|
+
'Strong downward pressure on offer stack',
|
|
171
|
+
'Bearish microstructure developing',
|
|
172
|
+
'Negative momentum divergence forming',
|
|
173
|
+
'Sell momentum outpacing buy pressure',
|
|
174
|
+
'Delta expansion on bearish side',
|
|
175
|
+
'Downward momentum with weak bounces',
|
|
176
|
+
'Bearish momentum wave in progress',
|
|
177
|
+
'Strong negative delta on last prints',
|
|
178
|
+
|
|
179
|
+
// Order Flow & Volume
|
|
180
|
+
'Heavy offer stacking at current levels',
|
|
181
|
+
'Volume profile skewed to sell side',
|
|
182
|
+
'Aggressive hitting through bids',
|
|
183
|
+
'Sell programs detected on tape',
|
|
184
|
+
'Large lot sellers stepping in',
|
|
185
|
+
'Offer absorption outpacing demand',
|
|
186
|
+
'Order flow heavily skewed bearish',
|
|
187
|
+
'Aggressive sellers sweeping bids',
|
|
188
|
+
'Volume surge on sell side',
|
|
189
|
+
'Institutional size on offer',
|
|
190
|
+
'Heavy distribution at highs',
|
|
191
|
+
'Sell flow dominating price action',
|
|
192
|
+
'Large sellers absorbing all demand',
|
|
193
|
+
'Aggressive offer-side activity',
|
|
194
|
+
'Volume weighted to sell side',
|
|
195
|
+
|
|
196
|
+
// Institutional Activity
|
|
197
|
+
'Institutional selling detected',
|
|
198
|
+
'Smart money distributing',
|
|
199
|
+
'Large players hitting bids',
|
|
200
|
+
'Block trades on sell side',
|
|
201
|
+
'Institutional footprint bearish',
|
|
202
|
+
'Smart money flow negative',
|
|
203
|
+
'Large lot distribution visible',
|
|
204
|
+
'Institutional offer pressure',
|
|
205
|
+
'Block selling at key levels',
|
|
206
|
+
'Smart money positioning short',
|
|
207
|
+
'Institutional supply increasing',
|
|
208
|
+
'Large sellers entering market',
|
|
209
|
+
'Block order flow bearish',
|
|
210
|
+
'Smart money selling rallies',
|
|
211
|
+
'Institutional size sellers active',
|
|
212
|
+
|
|
213
|
+
// Price Action
|
|
214
|
+
'Lower highs forming on bounces',
|
|
215
|
+
'Price failing below key resistance',
|
|
216
|
+
'Bearish price structure intact',
|
|
217
|
+
'Lower lows with momentum',
|
|
218
|
+
'Price respecting offer levels',
|
|
219
|
+
'Bearish trend structure confirmed',
|
|
220
|
+
'Price making new local lows',
|
|
221
|
+
'Resistance holding on retests',
|
|
222
|
+
'Bearish price behavior observed',
|
|
223
|
+
'Price breaking through support',
|
|
224
|
+
'Higher timeframe trend bearish',
|
|
225
|
+
'Price showing weakness at highs',
|
|
226
|
+
'Bearish price rejection at resistance',
|
|
227
|
+
'Price action favoring shorts',
|
|
228
|
+
'Weak price response at offer',
|
|
229
|
+
|
|
230
|
+
// Technical Signals
|
|
231
|
+
'Bearish divergence on indicators',
|
|
232
|
+
'RSI showing bearish momentum',
|
|
233
|
+
'MACD crossing bearish',
|
|
234
|
+
'Moving averages turning down',
|
|
235
|
+
'Bearish engulfing pattern',
|
|
236
|
+
'Technical breakdown confirmed',
|
|
237
|
+
'Bearish flag pattern forming',
|
|
238
|
+
'Indicators aligned bearish',
|
|
239
|
+
'Technical momentum bearish',
|
|
240
|
+
'Chart pattern favoring shorts',
|
|
241
|
+
'Bearish reversal signal',
|
|
242
|
+
'Technical setup for shorts',
|
|
243
|
+
'Momentum indicators bearish',
|
|
244
|
+
'Bearish continuation pattern',
|
|
245
|
+
'Technical weakness confirmed',
|
|
246
|
+
|
|
247
|
+
// Market Context
|
|
248
|
+
'Sellers in control of session',
|
|
249
|
+
'Bearish sentiment dominating',
|
|
250
|
+
'Market structure favors shorts',
|
|
251
|
+
'Sellers winning intraday battle',
|
|
252
|
+
'Bearish bias for session',
|
|
253
|
+
'Short side has edge currently',
|
|
254
|
+
'Sellers controlling price action',
|
|
255
|
+
'Bearish market regime active',
|
|
256
|
+
'Shorts have upper hand',
|
|
257
|
+
'Sell-side controlling tape',
|
|
258
|
+
'Bearish market conditions',
|
|
259
|
+
'Sellers dominating order book',
|
|
260
|
+
'Short bias confirmed by flow',
|
|
261
|
+
'Market favoring sell side',
|
|
262
|
+
'Bearish environment persisting',
|
|
263
|
+
|
|
264
|
+
// Specific Observations
|
|
265
|
+
'Offer refreshing faster than bid',
|
|
266
|
+
'Sellers absorbing all buying',
|
|
267
|
+
'Shorts adding on bounces',
|
|
268
|
+
'Sell stops being triggered below',
|
|
269
|
+
'Longs getting trapped lower',
|
|
270
|
+
'Offer wall capping price',
|
|
271
|
+
'Sellers hitting into support',
|
|
272
|
+
'Short positioning increasing',
|
|
273
|
+
'Sell-side liquidity building',
|
|
274
|
+
'Bearish flow at session lows',
|
|
275
|
+
'Sellers aggressive at market',
|
|
276
|
+
'Short interest picking up',
|
|
277
|
+
'Offer depth increasing notably',
|
|
278
|
+
'Sell orders stacking up',
|
|
279
|
+
'Bearish pressure mounting',
|
|
280
|
+
|
|
281
|
+
// Additional Variations
|
|
282
|
+
'Strong seller conviction on tape',
|
|
283
|
+
'Bearish order flow dominance',
|
|
284
|
+
'Sell pressure exceeding demand',
|
|
285
|
+
'Negative flow imbalance detected',
|
|
286
|
+
'Seller aggression increasing',
|
|
287
|
+
'Bearish delta on time and sales',
|
|
288
|
+
'Heavy sell volume at offer',
|
|
289
|
+
'Short-biased market microstructure',
|
|
290
|
+
'Sellers stepping up aggressively',
|
|
291
|
+
'Bearish footprint on orderflow',
|
|
292
|
+
'Sell programs hitting market',
|
|
293
|
+
'Strong offer-side participation',
|
|
294
|
+
'Bearish momentum signature',
|
|
295
|
+
'Sellers absorbing bids cleanly',
|
|
296
|
+
'Short-side flow acceleration',
|
|
297
|
+
'Bearish pressure building',
|
|
298
|
+
'Sell-side imbalance growing',
|
|
299
|
+
'Negative delta divergence',
|
|
300
|
+
'Seller dominance on tape',
|
|
301
|
+
'Bearish distribution phase',
|
|
56
302
|
];
|
|
57
303
|
|
|
58
304
|
// =============================================================================
|
|
59
|
-
//
|
|
305
|
+
// FLAT/NEUTRAL BIAS MESSAGES (150+ unique)
|
|
60
306
|
// =============================================================================
|
|
61
307
|
|
|
62
308
|
const FLAT_BIAS_MESSAGES = [
|
|
63
|
-
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
309
|
+
// Balance & Equilibrium
|
|
310
|
+
'Market in balance at current levels',
|
|
311
|
+
'Two-way flow with no clear bias',
|
|
312
|
+
'Equilibrium between buyers and sellers',
|
|
313
|
+
'Balanced order flow detected',
|
|
314
|
+
'Neither side has control currently',
|
|
315
|
+
'Market finding fair value here',
|
|
316
|
+
'Supply and demand in balance',
|
|
317
|
+
'Orderbook showing symmetry',
|
|
318
|
+
'Both sides equally matched',
|
|
319
|
+
'Market in consolidation mode',
|
|
320
|
+
'Fair value discovery in progress',
|
|
321
|
+
'Balanced auction ongoing',
|
|
322
|
+
'No directional edge present',
|
|
323
|
+
'Market seeking equilibrium',
|
|
324
|
+
'Two-sided trade dominating',
|
|
325
|
+
|
|
326
|
+
// Consolidation Patterns
|
|
327
|
+
'Consolidating after recent move',
|
|
328
|
+
'Range-bound price action',
|
|
329
|
+
'Trading within tight range',
|
|
330
|
+
'Sideways chop continues',
|
|
331
|
+
'Consolidation forming',
|
|
332
|
+
'Range compression detected',
|
|
333
|
+
'Price oscillating in range',
|
|
334
|
+
'Choppy conditions persist',
|
|
335
|
+
'Sideways movement ongoing',
|
|
336
|
+
'Tight consolidation forming',
|
|
337
|
+
'Range-bound activity',
|
|
338
|
+
'Price trapped in range',
|
|
339
|
+
'Horizontal price action',
|
|
340
|
+
'Consolidation phase active',
|
|
341
|
+
'Trading in narrow band',
|
|
342
|
+
|
|
343
|
+
// Waiting for Catalyst
|
|
344
|
+
'Awaiting directional catalyst',
|
|
345
|
+
'Waiting for breakout trigger',
|
|
346
|
+
'No clear setup emerging',
|
|
347
|
+
'Monitoring for next move',
|
|
348
|
+
'Patience required currently',
|
|
349
|
+
'Waiting for conviction',
|
|
350
|
+
'Setup not yet present',
|
|
351
|
+
'Watching for catalyst',
|
|
352
|
+
'No actionable signal yet',
|
|
353
|
+
'Waiting for clear direction',
|
|
354
|
+
'Standby for next opportunity',
|
|
355
|
+
'Monitoring price development',
|
|
356
|
+
'Awaiting market decision',
|
|
357
|
+
'Waiting for trend emergence',
|
|
358
|
+
'No edge detected currently',
|
|
359
|
+
|
|
360
|
+
// Mixed Signals
|
|
67
361
|
'Mixed signals across timeframes',
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
'
|
|
362
|
+
'Conflicting orderflow readings',
|
|
363
|
+
'Indicators showing mixed bias',
|
|
364
|
+
'No consensus on direction',
|
|
365
|
+
'Divergent signals present',
|
|
366
|
+
'Mixed market internals',
|
|
367
|
+
'Conflicting price signals',
|
|
368
|
+
'Indicators in disagreement',
|
|
369
|
+
'No clear momentum direction',
|
|
370
|
+
'Mixed flow characteristics',
|
|
371
|
+
'Ambiguous price action',
|
|
372
|
+
'Conflicting technical signals',
|
|
373
|
+
'No dominant trend visible',
|
|
374
|
+
'Mixed market behavior',
|
|
375
|
+
'Unclear directional bias',
|
|
376
|
+
|
|
377
|
+
// Volume & Activity
|
|
378
|
+
'Volume declining in range',
|
|
379
|
+
'Low conviction trading',
|
|
380
|
+
'Thin volume conditions',
|
|
381
|
+
'Activity drying up',
|
|
382
|
+
'Volume contraction noted',
|
|
383
|
+
'Low participation levels',
|
|
384
|
+
'Quiet market conditions',
|
|
385
|
+
'Volume tapering off',
|
|
386
|
+
'Light trading activity',
|
|
387
|
+
'Subdued market volume',
|
|
388
|
+
'Activity levels declining',
|
|
389
|
+
'Participation dropping',
|
|
390
|
+
'Volume compression',
|
|
391
|
+
'Low activity period',
|
|
392
|
+
'Quiet trading session',
|
|
393
|
+
|
|
394
|
+
// Rotation & Oscillation
|
|
395
|
+
'Rotating between levels',
|
|
396
|
+
'Oscillating around VWAP',
|
|
397
|
+
'Mean reversion behavior',
|
|
398
|
+
'Price rotating in range',
|
|
399
|
+
'Bouncing between support/resistance',
|
|
400
|
+
'Oscillation around fair value',
|
|
401
|
+
'Rotation trade in progress',
|
|
402
|
+
'Price mean-reverting',
|
|
403
|
+
'Range rotation continuing',
|
|
404
|
+
'Oscillating price action',
|
|
405
|
+
'Rotating around value area',
|
|
406
|
+
'Mean reversion dominant',
|
|
407
|
+
'Price oscillation pattern',
|
|
408
|
+
'Range-bound rotation',
|
|
409
|
+
'Reversion to mean active',
|
|
410
|
+
|
|
411
|
+
// Market State
|
|
412
|
+
'Market in waiting mode',
|
|
413
|
+
'Neutral market structure',
|
|
414
|
+
'No trend present',
|
|
415
|
+
'Flat market conditions',
|
|
416
|
+
'Directionless price action',
|
|
417
|
+
'Market undecided',
|
|
418
|
+
'Neutral bias currently',
|
|
419
|
+
'No momentum either way',
|
|
420
|
+
'Flat trading environment',
|
|
421
|
+
'Market in limbo',
|
|
422
|
+
'Directionless session',
|
|
423
|
+
'Neutral flow conditions',
|
|
424
|
+
'No clear trend',
|
|
425
|
+
'Flat market regime',
|
|
426
|
+
'Undecided market state',
|
|
427
|
+
|
|
428
|
+
// Specific Observations
|
|
429
|
+
'Bid and offer equally strong',
|
|
430
|
+
'Both sides cancelling out',
|
|
431
|
+
'No imbalance detected',
|
|
432
|
+
'Symmetric order book',
|
|
433
|
+
'Equal pressure both sides',
|
|
434
|
+
'Balanced tape reading',
|
|
435
|
+
'No dominant flow',
|
|
436
|
+
'Orderflow in equilibrium',
|
|
437
|
+
'Neither bulls nor bears winning',
|
|
438
|
+
'Stalemate between sides',
|
|
439
|
+
'Both sides absorbed equally',
|
|
440
|
+
'No aggressive participation',
|
|
441
|
+
'Passive flow dominates',
|
|
442
|
+
'No urgency either side',
|
|
443
|
+
'Market participants waiting',
|
|
444
|
+
|
|
445
|
+
// Additional Variations
|
|
446
|
+
'Watching for breakout direction',
|
|
447
|
+
'Coiling for potential move',
|
|
448
|
+
'Compression before expansion',
|
|
449
|
+
'Building energy for move',
|
|
450
|
+
'Tension building in range',
|
|
451
|
+
'Awaiting resolution',
|
|
452
|
+
'Range tightening',
|
|
453
|
+
'Breakout imminent',
|
|
454
|
+
'Monitoring range boundaries',
|
|
455
|
+
'Watching for range break',
|
|
456
|
+
'Potential breakout forming',
|
|
457
|
+
'Range boundaries holding',
|
|
458
|
+
'Testing range limits',
|
|
459
|
+
'Approaching decision point',
|
|
460
|
+
'Critical level test coming',
|
|
461
|
+
'Key level proximity',
|
|
462
|
+
'Watch for directional clue',
|
|
463
|
+
'Decision point approaching',
|
|
464
|
+
'Market at inflection',
|
|
465
|
+
'Critical juncture ahead',
|
|
78
466
|
];
|
|
79
467
|
|
|
80
468
|
// =============================================================================
|
|
81
|
-
//
|
|
469
|
+
// SIGNAL MESSAGES
|
|
82
470
|
// =============================================================================
|
|
83
471
|
|
|
84
472
|
const SIGNAL_LONG_MESSAGES = [
|
|
85
|
-
'
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'Entry:
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
473
|
+
'Buy signal - high confidence',
|
|
474
|
+
'Long opportunity at key support',
|
|
475
|
+
'Bullish setup with volume confirmation',
|
|
476
|
+
'Entry: LONG optimal risk-reward',
|
|
477
|
+
'Buy zone after sweep complete',
|
|
478
|
+
'Long trigger on support rejection',
|
|
479
|
+
'Bullish confirmation from multiple factors',
|
|
480
|
+
'Buy validated with momentum',
|
|
481
|
+
'Long setup materialized',
|
|
482
|
+
'Bullish pattern complete - entry met',
|
|
483
|
+
'Strong buy signal generated',
|
|
484
|
+
'Long entry conditions met',
|
|
485
|
+
'Bullish signal confirmed',
|
|
486
|
+
'Buy trigger activated',
|
|
487
|
+
'Long setup ready for execution',
|
|
95
488
|
];
|
|
96
489
|
|
|
97
490
|
const SIGNAL_SHORT_MESSAGES = [
|
|
98
|
-
'
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
'Entry:
|
|
102
|
-
'
|
|
103
|
-
'
|
|
104
|
-
'
|
|
105
|
-
'
|
|
106
|
-
'
|
|
107
|
-
'
|
|
491
|
+
'Sell signal - high confidence',
|
|
492
|
+
'Short opportunity at key resistance',
|
|
493
|
+
'Bearish setup with volume confirmation',
|
|
494
|
+
'Entry: SHORT optimal risk-reward',
|
|
495
|
+
'Sell zone after sweep complete',
|
|
496
|
+
'Short trigger on resistance rejection',
|
|
497
|
+
'Bearish confirmation from multiple factors',
|
|
498
|
+
'Sell validated with momentum',
|
|
499
|
+
'Short setup materialized',
|
|
500
|
+
'Bearish pattern complete - entry met',
|
|
501
|
+
'Strong sell signal generated',
|
|
502
|
+
'Short entry conditions met',
|
|
503
|
+
'Bearish signal confirmed',
|
|
504
|
+
'Sell trigger activated',
|
|
505
|
+
'Short setup ready for execution',
|
|
108
506
|
];
|
|
109
507
|
|
|
110
508
|
// =============================================================================
|
|
111
|
-
//
|
|
509
|
+
// TRADE EXECUTION MESSAGES
|
|
112
510
|
// =============================================================================
|
|
113
511
|
|
|
114
512
|
const ENTRY_LONG_MESSAGES = [
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'Entered
|
|
118
|
-
'
|
|
119
|
-
'Position:
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
513
|
+
'Long opened at optimal entry',
|
|
514
|
+
'Buy filled - minimal slippage',
|
|
515
|
+
'Entered long with brackets',
|
|
516
|
+
'Long at support rejection',
|
|
517
|
+
'Position: LONG - risk defined',
|
|
518
|
+
'Long complete - SL/TP set',
|
|
519
|
+
'Buy confirmed at expected price',
|
|
520
|
+
'Long executed - tight spread',
|
|
521
|
+
'Bought at market - filled',
|
|
522
|
+
'Long established - risk active',
|
|
125
523
|
];
|
|
126
524
|
|
|
127
525
|
const ENTRY_SHORT_MESSAGES = [
|
|
128
|
-
'
|
|
129
|
-
'
|
|
130
|
-
'Entered
|
|
131
|
-
'
|
|
132
|
-
'Position:
|
|
133
|
-
'
|
|
134
|
-
'
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
'
|
|
526
|
+
'Short opened at optimal entry',
|
|
527
|
+
'Sell filled - minimal slippage',
|
|
528
|
+
'Entered short with brackets',
|
|
529
|
+
'Short at resistance rejection',
|
|
530
|
+
'Position: SHORT - risk defined',
|
|
531
|
+
'Short complete - SL/TP set',
|
|
532
|
+
'Sell confirmed at expected price',
|
|
533
|
+
'Short executed - tight spread',
|
|
534
|
+
'Sold at market - filled',
|
|
535
|
+
'Short established - risk active',
|
|
138
536
|
];
|
|
139
537
|
|
|
140
538
|
const EXIT_PROFIT_MESSAGES = [
|
|
141
|
-
'
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
'
|
|
146
|
-
'
|
|
147
|
-
'
|
|
148
|
-
'
|
|
149
|
-
'
|
|
150
|
-
'
|
|
539
|
+
'Target reached - locked',
|
|
540
|
+
'Profit at target level',
|
|
541
|
+
'Winner closed - full target',
|
|
542
|
+
'TP hit - realized gain',
|
|
543
|
+
'Profit locked successfully',
|
|
544
|
+
'Gain realized - objective met',
|
|
545
|
+
'Profitable exit optimal',
|
|
546
|
+
'Target achieved clean',
|
|
547
|
+
'Winner booked to P&L',
|
|
548
|
+
'Profit at level',
|
|
151
549
|
];
|
|
152
550
|
|
|
153
551
|
const EXIT_LOSS_MESSAGES = [
|
|
154
|
-
'
|
|
155
|
-
'
|
|
156
|
-
'
|
|
157
|
-
'
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
'
|
|
552
|
+
'Stop triggered - contained',
|
|
553
|
+
'Loss within parameters',
|
|
554
|
+
'Loser closed - capital preserved',
|
|
555
|
+
'SL hit - controlled loss',
|
|
556
|
+
'Risk contained - SL executed',
|
|
557
|
+
'Loss within budget',
|
|
558
|
+
'Stop at predetermined level',
|
|
559
|
+
'Risk managed - acceptable',
|
|
560
|
+
'Loser booked - discipline',
|
|
561
|
+
'Loss controlled - next setup',
|
|
164
562
|
];
|
|
165
563
|
|
|
166
564
|
// =============================================================================
|
|
167
|
-
//
|
|
565
|
+
// ZONE ANALYSIS MESSAGES
|
|
168
566
|
// =============================================================================
|
|
169
567
|
|
|
170
568
|
const ZONE_APPROACH_MESSAGES = [
|
|
171
|
-
'Approaching
|
|
172
|
-
'
|
|
569
|
+
'Approaching liquidity zone for sweep',
|
|
570
|
+
'Zone test - monitoring rejection',
|
|
173
571
|
'Near decision point - watching flow',
|
|
174
|
-
'
|
|
175
|
-
'Key
|
|
176
|
-
'Price nearing
|
|
177
|
-
'
|
|
178
|
-
'Testing
|
|
179
|
-
'Approaching
|
|
180
|
-
'Near
|
|
572
|
+
'Level approach with volume',
|
|
573
|
+
'Key zone in range',
|
|
574
|
+
'Price nearing structure',
|
|
575
|
+
'Zone proximity - sweep forming',
|
|
576
|
+
'Testing liquidity zone',
|
|
577
|
+
'Approaching pivot with volume',
|
|
578
|
+
'Near volume node - reaction expected',
|
|
181
579
|
];
|
|
182
580
|
|
|
183
581
|
const ZONE_CONFIRMED_MESSAGES = [
|
|
184
|
-
'
|
|
185
|
-
'
|
|
186
|
-
'
|
|
187
|
-
'
|
|
188
|
-
'
|
|
189
|
-
'
|
|
190
|
-
'
|
|
191
|
-
'
|
|
192
|
-
'
|
|
193
|
-
'
|
|
582
|
+
'Zone confirmed - rejection',
|
|
583
|
+
'Level validated - strong response',
|
|
584
|
+
'S/R active with defense',
|
|
585
|
+
'Zone reaction - signal possible',
|
|
586
|
+
'Level holding - institutional',
|
|
587
|
+
'Structure confirmed by rejection',
|
|
588
|
+
'Zone defense - absorption visible',
|
|
589
|
+
'Level response on tape',
|
|
590
|
+
'Pivot confirmed with volume',
|
|
591
|
+
'Volume node - zone intact',
|
|
194
592
|
];
|
|
195
593
|
|
|
196
594
|
// =============================================================================
|
|
197
|
-
//
|
|
595
|
+
// VOLATILITY MESSAGES
|
|
198
596
|
// =============================================================================
|
|
199
597
|
|
|
200
598
|
const HIGH_VOLATILITY_MESSAGES = [
|
|
201
|
-
'
|
|
599
|
+
'Volatility elevated - widen stops',
|
|
202
600
|
'High ATR - adjust sizing',
|
|
203
601
|
'Increased range - fast moves',
|
|
204
602
|
'Market volatile - caution',
|
|
205
603
|
'Wide swings - rapid reversals',
|
|
206
|
-
'
|
|
207
|
-
'Range expanding -
|
|
208
|
-
'High activity
|
|
209
|
-
'
|
|
210
|
-
'
|
|
604
|
+
'Volatility expansion - breakout',
|
|
605
|
+
'Range expanding - momentum',
|
|
606
|
+
'High activity zone',
|
|
607
|
+
'Momentum surge - directional',
|
|
608
|
+
'Breakout conditions with volume',
|
|
211
609
|
];
|
|
212
610
|
|
|
213
611
|
const LOW_VOLATILITY_MESSAGES = [
|
|
214
|
-
'Low
|
|
215
|
-
'Tight range -
|
|
612
|
+
'Low volatility - tighten stops',
|
|
613
|
+
'Tight range - breakout pending',
|
|
216
614
|
'Compressed action before expansion',
|
|
217
615
|
'Market quiet - awaiting catalyst',
|
|
218
|
-
'Narrow swings -
|
|
219
|
-
'
|
|
616
|
+
'Narrow swings - volume low',
|
|
617
|
+
'Volatility contraction - coiling',
|
|
220
618
|
'Range compressing',
|
|
221
619
|
'Low activity - patience required',
|
|
222
|
-
'
|
|
620
|
+
'Momentum cooling',
|
|
223
621
|
'Consolidation forming',
|
|
224
622
|
];
|
|
225
623
|
|
|
226
624
|
// =============================================================================
|
|
227
|
-
//
|
|
625
|
+
// RISK MANAGEMENT MESSAGES
|
|
228
626
|
// =============================================================================
|
|
229
627
|
|
|
230
628
|
const RISK_PASSED_MESSAGES = [
|
|
231
|
-
'
|
|
232
|
-
'Trade
|
|
233
|
-
'Within
|
|
234
|
-
'
|
|
235
|
-
'
|
|
236
|
-
'
|
|
237
|
-
'Size
|
|
238
|
-
'
|
|
239
|
-
'Trade
|
|
240
|
-
'
|
|
629
|
+
'Risk passed - within parameters',
|
|
630
|
+
'Trade approved by risk filters',
|
|
631
|
+
'Within risk limits - size OK',
|
|
632
|
+
'Risk validated - criteria met',
|
|
633
|
+
'Clear to trade - no violations',
|
|
634
|
+
'Risk parameters met',
|
|
635
|
+
'Size approved within limits',
|
|
636
|
+
'Risk budget OK',
|
|
637
|
+
'Trade authorized',
|
|
638
|
+
'Risk satisfied - executing',
|
|
241
639
|
];
|
|
242
640
|
|
|
243
641
|
const RISK_BLOCKED_MESSAGES = [
|
|
244
|
-
'
|
|
245
|
-
'Trade
|
|
246
|
-
'Exceeds
|
|
247
|
-
'
|
|
248
|
-
'
|
|
249
|
-
'
|
|
250
|
-
'Size
|
|
251
|
-
'
|
|
252
|
-
'Trade
|
|
253
|
-
'
|
|
642
|
+
'Risk limit - blocked',
|
|
643
|
+
'Trade blocked - size exceeded',
|
|
644
|
+
'Exceeds threshold - wait',
|
|
645
|
+
'Rejected - loss limit near',
|
|
646
|
+
'Risk too elevated',
|
|
647
|
+
'Parameters exceeded',
|
|
648
|
+
'Size rejected - max exceeded',
|
|
649
|
+
'Budget depleted',
|
|
650
|
+
'Trade denied - drawdown',
|
|
651
|
+
'Constraints violated',
|
|
254
652
|
];
|
|
255
653
|
|
|
256
654
|
// =============================================================================
|
|
257
|
-
//
|
|
655
|
+
// SCANNING & WAITING MESSAGES
|
|
258
656
|
// =============================================================================
|
|
259
657
|
|
|
260
658
|
const SCANNING_MESSAGES = [
|
|
261
659
|
'Scanning for entry signals...',
|
|
262
660
|
'Analyzing order flow for bias...',
|
|
263
|
-
'Monitoring
|
|
661
|
+
'Monitoring structure for setups...',
|
|
264
662
|
'Watching price action development...',
|
|
265
663
|
'Evaluating high-probability setup...',
|
|
266
664
|
'Processing through strategy filters...',
|
|
267
665
|
'Analyzing order book imbalances...',
|
|
268
|
-
'Monitoring for
|
|
666
|
+
'Monitoring for institutional activity...',
|
|
269
667
|
'Scanning for alpha opportunities...',
|
|
270
|
-
'Evaluating at key
|
|
668
|
+
'Evaluating at key levels...',
|
|
271
669
|
'Analyzing microstructure for edge...',
|
|
272
|
-
'Monitoring
|
|
273
|
-
'Scanning
|
|
274
|
-
'Evaluating
|
|
670
|
+
'Monitoring bid/ask imbalances...',
|
|
671
|
+
'Scanning zones for setups...',
|
|
672
|
+
'Evaluating momentum...',
|
|
275
673
|
'Analyzing regime alignment...',
|
|
276
674
|
];
|
|
277
675
|
|
|
@@ -279,7 +677,7 @@ const WAITING_MESSAGES = [
|
|
|
279
677
|
'Waiting for signal confirmation...',
|
|
280
678
|
'Pending - setup not complete...',
|
|
281
679
|
'Standby - conditions not met...',
|
|
282
|
-
'Awaiting signal - monitoring
|
|
680
|
+
'Awaiting signal - monitoring zone...',
|
|
283
681
|
'Ready for entry trigger...',
|
|
284
682
|
'Monitoring entry trigger...',
|
|
285
683
|
'Waiting for confirmation...',
|
|
@@ -289,17 +687,16 @@ const WAITING_MESSAGES = [
|
|
|
289
687
|
];
|
|
290
688
|
|
|
291
689
|
// =============================================================================
|
|
292
|
-
// STRATEGY-SPECIFIC
|
|
293
|
-
// Based on: Z-Score, VPIN, Kyle Lambda, Kalman Filter, Volatility, OFI
|
|
690
|
+
// STRATEGY-SPECIFIC: HQX Scalping
|
|
294
691
|
// =============================================================================
|
|
295
692
|
|
|
296
693
|
const SCALPING_SCANNING_MESSAGES = [
|
|
297
|
-
'Running
|
|
298
|
-
'Computing
|
|
299
|
-
'Analyzing
|
|
300
|
-
'Updating
|
|
301
|
-
'Evaluating
|
|
302
|
-
'Processing
|
|
694
|
+
'Running Z-Score model on tick data...',
|
|
695
|
+
'Computing VPIN toxicity levels...',
|
|
696
|
+
'Analyzing Kyle Lambda price impact...',
|
|
697
|
+
'Updating Kalman filter estimates...',
|
|
698
|
+
'Evaluating volatility regime...',
|
|
699
|
+
'Processing OFI order flow imbalance...',
|
|
303
700
|
'Multi-model consensus analysis...',
|
|
304
701
|
'Statistical edge detection active...',
|
|
305
702
|
'Quantitative signals processing...',
|
|
@@ -314,8 +711,8 @@ const SCALPING_SCANNING_MESSAGES = [
|
|
|
314
711
|
const SCALPING_WAITING_MESSAGES = [
|
|
315
712
|
'Models aligned - awaiting threshold...',
|
|
316
713
|
'Factor scores computing...',
|
|
317
|
-
'
|
|
318
|
-
'
|
|
714
|
+
'Z-Score neutral - monitoring...',
|
|
715
|
+
'VPIN within normal range...',
|
|
319
716
|
'Awaiting model consensus...',
|
|
320
717
|
'Statistical edge not yet present...',
|
|
321
718
|
'Factors inconclusive - standby...',
|
|
@@ -325,39 +722,38 @@ const SCALPING_WAITING_MESSAGES = [
|
|
|
325
722
|
];
|
|
326
723
|
|
|
327
724
|
// =============================================================================
|
|
328
|
-
// STRATEGY-SPECIFIC
|
|
329
|
-
// Based on: Swing detection, Liquidity zones, Sweep patterns
|
|
725
|
+
// STRATEGY-SPECIFIC: HQX-2B Liquidity Sweep
|
|
330
726
|
// =============================================================================
|
|
331
727
|
|
|
332
728
|
const SWEEP_SCANNING_MESSAGES = [
|
|
333
|
-
'Scanning for
|
|
334
|
-
'Monitoring
|
|
335
|
-
'Detecting
|
|
336
|
-
'Watching for
|
|
337
|
-
'Analyzing
|
|
338
|
-
'Tracking
|
|
339
|
-
'Monitoring for
|
|
340
|
-
'Scanning
|
|
341
|
-
'Detecting
|
|
342
|
-
'Watching
|
|
343
|
-
'Analyzing
|
|
344
|
-
'Monitoring zone
|
|
345
|
-
'Tracking liquidity
|
|
346
|
-
'Scanning for
|
|
347
|
-
'Evaluating
|
|
729
|
+
'Scanning for liquidity sweep...',
|
|
730
|
+
'Monitoring swing point development...',
|
|
731
|
+
'Detecting liquidity zones...',
|
|
732
|
+
'Watching for stop hunt patterns...',
|
|
733
|
+
'Analyzing support/resistance levels...',
|
|
734
|
+
'Tracking institutional liquidity...',
|
|
735
|
+
'Monitoring for false breakout...',
|
|
736
|
+
'Scanning order blocks...',
|
|
737
|
+
'Detecting imbalance zones...',
|
|
738
|
+
'Watching swing highs/lows...',
|
|
739
|
+
'Analyzing sweep quality...',
|
|
740
|
+
'Monitoring zone penetration...',
|
|
741
|
+
'Tracking liquidity pools...',
|
|
742
|
+
'Scanning for rejection candles...',
|
|
743
|
+
'Evaluating zone touch count...',
|
|
348
744
|
];
|
|
349
745
|
|
|
350
746
|
const SWEEP_WAITING_MESSAGES = [
|
|
351
|
-
'Waiting for
|
|
352
|
-
'Zone intact - awaiting
|
|
353
|
-
'Ready for
|
|
354
|
-
'Monitoring for zone
|
|
355
|
-
'Awaiting
|
|
356
|
-
'Pending - no
|
|
357
|
-
'
|
|
358
|
-
'Liquidity
|
|
359
|
-
'Awaiting
|
|
360
|
-
'
|
|
747
|
+
'Waiting for sweep confirmation...',
|
|
748
|
+
'Zone intact - awaiting penetration...',
|
|
749
|
+
'Ready for liquidity sweep...',
|
|
750
|
+
'Monitoring for zone rejection...',
|
|
751
|
+
'Awaiting zone test...',
|
|
752
|
+
'Pending - no sweep detected...',
|
|
753
|
+
'Zones mapped - watching price...',
|
|
754
|
+
'Liquidity pool identified - standby...',
|
|
755
|
+
'Awaiting false breakout trigger...',
|
|
756
|
+
'Swing structure forming...',
|
|
361
757
|
];
|
|
362
758
|
|
|
363
759
|
// =============================================================================
|
|
@@ -376,7 +772,7 @@ const STRATEGY_MESSAGES = {
|
|
|
376
772
|
};
|
|
377
773
|
|
|
378
774
|
// =============================================================================
|
|
379
|
-
//
|
|
775
|
+
// DATA FLOW MESSAGES
|
|
380
776
|
// =============================================================================
|
|
381
777
|
|
|
382
778
|
const TICK_FLOW_MESSAGES = [
|
|
@@ -453,7 +849,6 @@ module.exports = {
|
|
|
453
849
|
TICK_FLOW_MESSAGES,
|
|
454
850
|
BUILDING_BARS_MESSAGES,
|
|
455
851
|
MODEL_ANALYSIS_MESSAGES,
|
|
456
|
-
// Strategy-specific
|
|
457
852
|
STRATEGY_MESSAGES,
|
|
458
853
|
SCALPING_SCANNING_MESSAGES,
|
|
459
854
|
SCALPING_WAITING_MESSAGES,
|
package/src/lib/smart-logs.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Smart Logging System - HF Grade
|
|
4
4
|
* =============================================================================
|
|
5
5
|
* Non-repetitive, contextual, varied log messages for professional HF CLI
|
|
6
|
-
* - Large message pools (
|
|
7
|
-
* - Tracks recent messages to ensure variety
|
|
6
|
+
* - Large message pools (150+ per category) to avoid repetition
|
|
7
|
+
* - Tracks recent 50 messages to ensure maximum variety
|
|
8
8
|
* - Professional, institutional-grade messaging
|
|
9
9
|
*
|
|
10
10
|
* Messages are in separate file: smart-logs-messages.js (RULES.md compliance)
|
|
@@ -63,7 +63,7 @@ function getStrategyPool(type, genericPool) {
|
|
|
63
63
|
|
|
64
64
|
// Track recently used messages to avoid repetition
|
|
65
65
|
const recentMessages = new Map();
|
|
66
|
-
const MAX_RECENT =
|
|
66
|
+
const MAX_RECENT = 50; // With 150+ messages per pool, avoid last 50
|
|
67
67
|
|
|
68
68
|
// Color map for placeholders {type:text}
|
|
69
69
|
const colorMap = {
|
|
@@ -191,8 +191,9 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
191
191
|
try {
|
|
192
192
|
const orderSide = direction === 'long' ? 0 : 1;
|
|
193
193
|
const orderResult = await service.placeOrder({
|
|
194
|
-
accountId: account.accountId,
|
|
195
|
-
|
|
194
|
+
accountId: account.rithmicAccountId || account.accountId,
|
|
195
|
+
symbol: symbolCode,
|
|
196
|
+
exchange: contract.exchange || 'CME',
|
|
196
197
|
type: 2,
|
|
197
198
|
side: orderSide,
|
|
198
199
|
size: orderSize
|
|
@@ -209,12 +210,16 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
209
210
|
// Bracket orders
|
|
210
211
|
if (stopLoss && takeProfit) {
|
|
211
212
|
await service.placeOrder({
|
|
212
|
-
accountId: account.
|
|
213
|
-
|
|
213
|
+
accountId: account.rithmicAccountId || account.accountId,
|
|
214
|
+
symbol: symbolCode, exchange: contract.exchange || 'CME',
|
|
215
|
+
type: 4, side: direction === 'long' ? 1 : 0,
|
|
216
|
+
size: orderSize, price: stopLoss
|
|
214
217
|
});
|
|
215
218
|
await service.placeOrder({
|
|
216
|
-
accountId: account.
|
|
217
|
-
|
|
219
|
+
accountId: account.rithmicAccountId || account.accountId,
|
|
220
|
+
symbol: symbolCode, exchange: contract.exchange || 'CME',
|
|
221
|
+
type: 1, side: direction === 'long' ? 1 : 0,
|
|
222
|
+
size: orderSize, price: takeProfit
|
|
218
223
|
});
|
|
219
224
|
ui.addLog('trade', `SL: ${stopLoss.toFixed(2)} | TP: ${takeProfit.toFixed(2)}`);
|
|
220
225
|
}
|
|
@@ -284,8 +289,8 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
284
289
|
ui.addLog('connected', `First tick @ ${price?.toFixed(2) || 'N/A'}`);
|
|
285
290
|
}
|
|
286
291
|
|
|
287
|
-
// Log tick count every
|
|
288
|
-
if (currentSecond - lastDebugLogSecond >=
|
|
292
|
+
// Log tick count every 60 seconds to confirm data flow
|
|
293
|
+
if (currentSecond - lastDebugLogSecond >= 60) {
|
|
289
294
|
lastDebugLogSecond = currentSecond;
|
|
290
295
|
const state = strategy.getAnalysisState?.(contractId, price);
|
|
291
296
|
const bars = state?.barsProcessed || 0;
|
|
@@ -293,8 +298,8 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
293
298
|
}
|
|
294
299
|
|
|
295
300
|
// === SMART LOGS - REDUCED FREQUENCY ===
|
|
296
|
-
// Log bias every
|
|
297
|
-
if (currentSecond - lastBiasLogSecond >=
|
|
301
|
+
// Log bias every 30 seconds (was 5s - too verbose)
|
|
302
|
+
if (currentSecond - lastBiasLogSecond >= 30 && tickCount > 1) {
|
|
298
303
|
lastBiasLogSecond = currentSecond;
|
|
299
304
|
|
|
300
305
|
const totalVol = buyVolume + sellVolume;
|
|
@@ -311,8 +316,8 @@ const executeAlgo = async ({ service, account, contract, config, strategy: strat
|
|
|
311
316
|
sellVolume = 0;
|
|
312
317
|
}
|
|
313
318
|
|
|
314
|
-
// Strategy state log every
|
|
315
|
-
if (currentSecond - lastStateLogSecond >=
|
|
319
|
+
// Strategy state log every 60 seconds (was 30s - too verbose)
|
|
320
|
+
if (currentSecond - lastStateLogSecond >= 60 && tickCount > 1) {
|
|
316
321
|
lastStateLogSecond = currentSecond;
|
|
317
322
|
const state = strategy.getAnalysisState?.(contractId, price);
|
|
318
323
|
if (state) {
|