@one_deploy/sdk 1.2.0 → 1.2.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/dist/hooks/index.js +20 -20
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +20 -20
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.js +20 -20
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +20 -20
- package/dist/react-native.mjs.map +1 -1
- package/dist/services/index.js +20 -20
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +20 -20
- package/dist/services/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/services/forex/BotSimulationEngine.ts +21 -21
package/package.json
CHANGED
|
@@ -92,8 +92,8 @@ export const STRATEGY_PERSONALITIES: StrategyPersonality[] = [
|
|
|
92
92
|
name: 'Balanced Alpha',
|
|
93
93
|
shortName: 'BAL',
|
|
94
94
|
color: '#3B82F6',
|
|
95
|
-
scanIntervalMin:
|
|
96
|
-
scanIntervalMax:
|
|
95
|
+
scanIntervalMin: 45000, // 45-70s between cycles (slower for readability)
|
|
96
|
+
scanIntervalMax: 70000,
|
|
97
97
|
tradeFrequency: 0.4,
|
|
98
98
|
positionSizeMin: 15,
|
|
99
99
|
positionSizeMax: 35,
|
|
@@ -109,8 +109,8 @@ export const STRATEGY_PERSONALITIES: StrategyPersonality[] = [
|
|
|
109
109
|
name: 'Conservative Shield',
|
|
110
110
|
shortName: 'CON',
|
|
111
111
|
color: '#10B981',
|
|
112
|
-
scanIntervalMin:
|
|
113
|
-
scanIntervalMax:
|
|
112
|
+
scanIntervalMin: 60000, // 60-90s between cycles (slower for readability)
|
|
113
|
+
scanIntervalMax: 90000,
|
|
114
114
|
tradeFrequency: 0.25,
|
|
115
115
|
positionSizeMin: 10,
|
|
116
116
|
positionSizeMax: 20,
|
|
@@ -126,8 +126,8 @@ export const STRATEGY_PERSONALITIES: StrategyPersonality[] = [
|
|
|
126
126
|
name: 'Aggressive Momentum',
|
|
127
127
|
shortName: 'AGG',
|
|
128
128
|
color: '#EF4444',
|
|
129
|
-
scanIntervalMin:
|
|
130
|
-
scanIntervalMax:
|
|
129
|
+
scanIntervalMin: 35000, // 35-55s between cycles (slower for readability)
|
|
130
|
+
scanIntervalMax: 55000,
|
|
131
131
|
tradeFrequency: 0.5,
|
|
132
132
|
positionSizeMin: 25,
|
|
133
133
|
positionSizeMax: 50,
|
|
@@ -428,7 +428,7 @@ class BotSimulationEngine {
|
|
|
428
428
|
},
|
|
429
429
|
delay,
|
|
430
430
|
});
|
|
431
|
-
delay += rand(
|
|
431
|
+
delay += rand(2000, 3500); // 2-3.5s after SCAN
|
|
432
432
|
|
|
433
433
|
// 2. THINKING - AI reasoning process (new)
|
|
434
434
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
@@ -443,7 +443,7 @@ class BotSimulationEngine {
|
|
|
443
443
|
},
|
|
444
444
|
delay,
|
|
445
445
|
});
|
|
446
|
-
delay += rand(
|
|
446
|
+
delay += rand(1500, 2500); // 1.5-2.5s between thoughts
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
// 3. INDICATOR - Always (slower delay)
|
|
@@ -478,9 +478,9 @@ class BotSimulationEngine {
|
|
|
478
478
|
},
|
|
479
479
|
delay,
|
|
480
480
|
});
|
|
481
|
-
delay += rand(
|
|
481
|
+
delay += rand(2000, 3500); // 2-3.5s after INDICATOR
|
|
482
482
|
|
|
483
|
-
// 4. NEWS - 12% chance
|
|
483
|
+
// 4. NEWS - 12% chance
|
|
484
484
|
if (Math.random() < 0.12) {
|
|
485
485
|
const sentiment = Math.random() > 0.4 ? 'Bullish' : 'Bearish';
|
|
486
486
|
entries.push({
|
|
@@ -493,10 +493,10 @@ class BotSimulationEngine {
|
|
|
493
493
|
},
|
|
494
494
|
delay,
|
|
495
495
|
});
|
|
496
|
-
delay += rand(
|
|
496
|
+
delay += rand(2500, 4000); // 2.5-4s after NEWS
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
// 5. ANALYSIS - 40% chance
|
|
499
|
+
// 5. ANALYSIS - 40% chance
|
|
500
500
|
if (Math.random() < 0.4) {
|
|
501
501
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
502
502
|
entries.push({
|
|
@@ -509,7 +509,7 @@ class BotSimulationEngine {
|
|
|
509
509
|
},
|
|
510
510
|
delay,
|
|
511
511
|
});
|
|
512
|
-
delay += rand(
|
|
512
|
+
delay += rand(2500, 4000); // 2.5-4s after ANALYSIS
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
// 6-10. Signal evaluation and potential trade
|
|
@@ -537,7 +537,7 @@ class BotSimulationEngine {
|
|
|
537
537
|
},
|
|
538
538
|
delay,
|
|
539
539
|
});
|
|
540
|
-
delay += rand(
|
|
540
|
+
delay += rand(3000, 5000); // 3-5s after STRATEGY
|
|
541
541
|
|
|
542
542
|
// 7. SIGNAL
|
|
543
543
|
entries.push({
|
|
@@ -551,7 +551,7 @@ class BotSimulationEngine {
|
|
|
551
551
|
},
|
|
552
552
|
delay,
|
|
553
553
|
});
|
|
554
|
-
delay += rand(
|
|
554
|
+
delay += rand(3000, 4500); // 3-4.5s after SIGNAL
|
|
555
555
|
|
|
556
556
|
// 8. DECISION
|
|
557
557
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
@@ -573,7 +573,7 @@ class BotSimulationEngine {
|
|
|
573
573
|
},
|
|
574
574
|
delay,
|
|
575
575
|
});
|
|
576
|
-
delay += rand(
|
|
576
|
+
delay += rand(2500, 4000); // 2.5-4s after DECISION
|
|
577
577
|
|
|
578
578
|
// 9. ORDER
|
|
579
579
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
@@ -603,7 +603,7 @@ class BotSimulationEngine {
|
|
|
603
603
|
},
|
|
604
604
|
delay,
|
|
605
605
|
});
|
|
606
|
-
delay += rand(
|
|
606
|
+
delay += rand(4000, 7000); // 4-7s for order execution
|
|
607
607
|
|
|
608
608
|
// 10. FILLED
|
|
609
609
|
const fillPrice = orderPrice * (1 + rand(-0.0003, 0.0003));
|
|
@@ -656,9 +656,9 @@ class BotSimulationEngine {
|
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
|
|
659
|
-
// 11. PNL - Update open positions
|
|
659
|
+
// 11. PNL - Update open positions
|
|
660
660
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
661
|
-
delay += rand(
|
|
661
|
+
delay += rand(3500, 5500); // 3.5-5.5s before PNL
|
|
662
662
|
let totalPositionPnl = 0;
|
|
663
663
|
const pnlParts: string[] = [];
|
|
664
664
|
|
|
@@ -701,9 +701,9 @@ class BotSimulationEngine {
|
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
|
|
704
|
-
// 12. RISK - Periodic check
|
|
704
|
+
// 12. RISK - Periodic check
|
|
705
705
|
if (Math.random() < 0.2) {
|
|
706
|
-
delay += rand(
|
|
706
|
+
delay += rand(3000, 5000); // 3-5s before RISK
|
|
707
707
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
708
708
|
const maxDrawdown = rand(2, 12);
|
|
709
709
|
entries.push({
|