@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/dist/services/index.mjs
CHANGED
|
@@ -2581,9 +2581,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2581
2581
|
name: "Balanced Alpha",
|
|
2582
2582
|
shortName: "BAL",
|
|
2583
2583
|
color: "#3B82F6",
|
|
2584
|
-
scanIntervalMin:
|
|
2585
|
-
//
|
|
2586
|
-
scanIntervalMax:
|
|
2584
|
+
scanIntervalMin: 45e3,
|
|
2585
|
+
// 45-70s between cycles (slower for readability)
|
|
2586
|
+
scanIntervalMax: 7e4,
|
|
2587
2587
|
tradeFrequency: 0.4,
|
|
2588
2588
|
positionSizeMin: 15,
|
|
2589
2589
|
positionSizeMax: 35,
|
|
@@ -2599,9 +2599,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2599
2599
|
name: "Conservative Shield",
|
|
2600
2600
|
shortName: "CON",
|
|
2601
2601
|
color: "#10B981",
|
|
2602
|
-
scanIntervalMin:
|
|
2603
|
-
//
|
|
2604
|
-
scanIntervalMax:
|
|
2602
|
+
scanIntervalMin: 6e4,
|
|
2603
|
+
// 60-90s between cycles (slower for readability)
|
|
2604
|
+
scanIntervalMax: 9e4,
|
|
2605
2605
|
tradeFrequency: 0.25,
|
|
2606
2606
|
positionSizeMin: 10,
|
|
2607
2607
|
positionSizeMax: 20,
|
|
@@ -2617,9 +2617,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2617
2617
|
name: "Aggressive Momentum",
|
|
2618
2618
|
shortName: "AGG",
|
|
2619
2619
|
color: "#EF4444",
|
|
2620
|
-
scanIntervalMin:
|
|
2621
|
-
//
|
|
2622
|
-
scanIntervalMax:
|
|
2620
|
+
scanIntervalMin: 35e3,
|
|
2621
|
+
// 35-55s between cycles (slower for readability)
|
|
2622
|
+
scanIntervalMax: 55e3,
|
|
2623
2623
|
tradeFrequency: 0.5,
|
|
2624
2624
|
positionSizeMin: 25,
|
|
2625
2625
|
positionSizeMax: 50,
|
|
@@ -2869,7 +2869,7 @@ var BotSimulationEngine = class {
|
|
|
2869
2869
|
},
|
|
2870
2870
|
delay
|
|
2871
2871
|
});
|
|
2872
|
-
delay += rand3(
|
|
2872
|
+
delay += rand3(2e3, 3500);
|
|
2873
2873
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
2874
2874
|
for (const thinking of thinkingMessages) {
|
|
2875
2875
|
entries.push({
|
|
@@ -2882,7 +2882,7 @@ var BotSimulationEngine = class {
|
|
|
2882
2882
|
},
|
|
2883
2883
|
delay
|
|
2884
2884
|
});
|
|
2885
|
-
delay += rand3(
|
|
2885
|
+
delay += rand3(1500, 2500);
|
|
2886
2886
|
}
|
|
2887
2887
|
const indicatorParts = [];
|
|
2888
2888
|
if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
|
|
@@ -2914,7 +2914,7 @@ var BotSimulationEngine = class {
|
|
|
2914
2914
|
},
|
|
2915
2915
|
delay
|
|
2916
2916
|
});
|
|
2917
|
-
delay += rand3(
|
|
2917
|
+
delay += rand3(2e3, 3500);
|
|
2918
2918
|
if (Math.random() < 0.12) {
|
|
2919
2919
|
const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
|
|
2920
2920
|
entries.push({
|
|
@@ -2927,7 +2927,7 @@ var BotSimulationEngine = class {
|
|
|
2927
2927
|
},
|
|
2928
2928
|
delay
|
|
2929
2929
|
});
|
|
2930
|
-
delay += rand3(
|
|
2930
|
+
delay += rand3(2500, 4e3);
|
|
2931
2931
|
}
|
|
2932
2932
|
if (Math.random() < 0.4) {
|
|
2933
2933
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
@@ -2941,7 +2941,7 @@ var BotSimulationEngine = class {
|
|
|
2941
2941
|
},
|
|
2942
2942
|
delay
|
|
2943
2943
|
});
|
|
2944
|
-
delay += rand3(
|
|
2944
|
+
delay += rand3(2500, 4e3);
|
|
2945
2945
|
}
|
|
2946
2946
|
const signal = this.evaluateSignal(strategy, indicators);
|
|
2947
2947
|
state.lastSignal = signal.direction;
|
|
@@ -2965,7 +2965,7 @@ var BotSimulationEngine = class {
|
|
|
2965
2965
|
},
|
|
2966
2966
|
delay
|
|
2967
2967
|
});
|
|
2968
|
-
delay += rand3(
|
|
2968
|
+
delay += rand3(3e3, 5e3);
|
|
2969
2969
|
entries.push({
|
|
2970
2970
|
entry: {
|
|
2971
2971
|
strategyId: strategy.id,
|
|
@@ -2977,7 +2977,7 @@ var BotSimulationEngine = class {
|
|
|
2977
2977
|
},
|
|
2978
2978
|
delay
|
|
2979
2979
|
});
|
|
2980
|
-
delay += rand3(
|
|
2980
|
+
delay += rand3(3e3, 4500);
|
|
2981
2981
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
2982
2982
|
if (decision.execute) {
|
|
2983
2983
|
entries.push({
|
|
@@ -2997,7 +2997,7 @@ var BotSimulationEngine = class {
|
|
|
2997
2997
|
},
|
|
2998
2998
|
delay
|
|
2999
2999
|
});
|
|
3000
|
-
delay += rand3(
|
|
3000
|
+
delay += rand3(2500, 4e3);
|
|
3001
3001
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
3002
3002
|
const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
|
|
3003
3003
|
entries.push({
|
|
@@ -3022,7 +3022,7 @@ var BotSimulationEngine = class {
|
|
|
3022
3022
|
},
|
|
3023
3023
|
delay
|
|
3024
3024
|
});
|
|
3025
|
-
delay += rand3(
|
|
3025
|
+
delay += rand3(4e3, 7e3);
|
|
3026
3026
|
const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
|
|
3027
3027
|
const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
|
|
3028
3028
|
entries.push({
|
|
@@ -3071,7 +3071,7 @@ var BotSimulationEngine = class {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
3073
3073
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
3074
|
-
delay += rand3(
|
|
3074
|
+
delay += rand3(3500, 5500);
|
|
3075
3075
|
let totalPositionPnl = 0;
|
|
3076
3076
|
const pnlParts = [];
|
|
3077
3077
|
for (const pos of state.openPositions) {
|
|
@@ -3107,7 +3107,7 @@ var BotSimulationEngine = class {
|
|
|
3107
3107
|
});
|
|
3108
3108
|
}
|
|
3109
3109
|
if (Math.random() < 0.2) {
|
|
3110
|
-
delay += rand3(
|
|
3110
|
+
delay += rand3(3e3, 5e3);
|
|
3111
3111
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
3112
3112
|
const maxDrawdown = rand3(2, 12);
|
|
3113
3113
|
entries.push({
|