@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.js
CHANGED
|
@@ -2583,9 +2583,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2583
2583
|
name: "Balanced Alpha",
|
|
2584
2584
|
shortName: "BAL",
|
|
2585
2585
|
color: "#3B82F6",
|
|
2586
|
-
scanIntervalMin:
|
|
2587
|
-
//
|
|
2588
|
-
scanIntervalMax:
|
|
2586
|
+
scanIntervalMin: 45e3,
|
|
2587
|
+
// 45-70s between cycles (slower for readability)
|
|
2588
|
+
scanIntervalMax: 7e4,
|
|
2589
2589
|
tradeFrequency: 0.4,
|
|
2590
2590
|
positionSizeMin: 15,
|
|
2591
2591
|
positionSizeMax: 35,
|
|
@@ -2601,9 +2601,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2601
2601
|
name: "Conservative Shield",
|
|
2602
2602
|
shortName: "CON",
|
|
2603
2603
|
color: "#10B981",
|
|
2604
|
-
scanIntervalMin:
|
|
2605
|
-
//
|
|
2606
|
-
scanIntervalMax:
|
|
2604
|
+
scanIntervalMin: 6e4,
|
|
2605
|
+
// 60-90s between cycles (slower for readability)
|
|
2606
|
+
scanIntervalMax: 9e4,
|
|
2607
2607
|
tradeFrequency: 0.25,
|
|
2608
2608
|
positionSizeMin: 10,
|
|
2609
2609
|
positionSizeMax: 20,
|
|
@@ -2619,9 +2619,9 @@ var STRATEGY_PERSONALITIES = [
|
|
|
2619
2619
|
name: "Aggressive Momentum",
|
|
2620
2620
|
shortName: "AGG",
|
|
2621
2621
|
color: "#EF4444",
|
|
2622
|
-
scanIntervalMin:
|
|
2623
|
-
//
|
|
2624
|
-
scanIntervalMax:
|
|
2622
|
+
scanIntervalMin: 35e3,
|
|
2623
|
+
// 35-55s between cycles (slower for readability)
|
|
2624
|
+
scanIntervalMax: 55e3,
|
|
2625
2625
|
tradeFrequency: 0.5,
|
|
2626
2626
|
positionSizeMin: 25,
|
|
2627
2627
|
positionSizeMax: 50,
|
|
@@ -2871,7 +2871,7 @@ var BotSimulationEngine = class {
|
|
|
2871
2871
|
},
|
|
2872
2872
|
delay
|
|
2873
2873
|
});
|
|
2874
|
-
delay += rand3(
|
|
2874
|
+
delay += rand3(2e3, 3500);
|
|
2875
2875
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
2876
2876
|
for (const thinking of thinkingMessages) {
|
|
2877
2877
|
entries.push({
|
|
@@ -2884,7 +2884,7 @@ var BotSimulationEngine = class {
|
|
|
2884
2884
|
},
|
|
2885
2885
|
delay
|
|
2886
2886
|
});
|
|
2887
|
-
delay += rand3(
|
|
2887
|
+
delay += rand3(1500, 2500);
|
|
2888
2888
|
}
|
|
2889
2889
|
const indicatorParts = [];
|
|
2890
2890
|
if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
|
|
@@ -2916,7 +2916,7 @@ var BotSimulationEngine = class {
|
|
|
2916
2916
|
},
|
|
2917
2917
|
delay
|
|
2918
2918
|
});
|
|
2919
|
-
delay += rand3(
|
|
2919
|
+
delay += rand3(2e3, 3500);
|
|
2920
2920
|
if (Math.random() < 0.12) {
|
|
2921
2921
|
const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
|
|
2922
2922
|
entries.push({
|
|
@@ -2929,7 +2929,7 @@ var BotSimulationEngine = class {
|
|
|
2929
2929
|
},
|
|
2930
2930
|
delay
|
|
2931
2931
|
});
|
|
2932
|
-
delay += rand3(
|
|
2932
|
+
delay += rand3(2500, 4e3);
|
|
2933
2933
|
}
|
|
2934
2934
|
if (Math.random() < 0.4) {
|
|
2935
2935
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
@@ -2943,7 +2943,7 @@ var BotSimulationEngine = class {
|
|
|
2943
2943
|
},
|
|
2944
2944
|
delay
|
|
2945
2945
|
});
|
|
2946
|
-
delay += rand3(
|
|
2946
|
+
delay += rand3(2500, 4e3);
|
|
2947
2947
|
}
|
|
2948
2948
|
const signal = this.evaluateSignal(strategy, indicators);
|
|
2949
2949
|
state.lastSignal = signal.direction;
|
|
@@ -2967,7 +2967,7 @@ var BotSimulationEngine = class {
|
|
|
2967
2967
|
},
|
|
2968
2968
|
delay
|
|
2969
2969
|
});
|
|
2970
|
-
delay += rand3(
|
|
2970
|
+
delay += rand3(3e3, 5e3);
|
|
2971
2971
|
entries.push({
|
|
2972
2972
|
entry: {
|
|
2973
2973
|
strategyId: strategy.id,
|
|
@@ -2979,7 +2979,7 @@ var BotSimulationEngine = class {
|
|
|
2979
2979
|
},
|
|
2980
2980
|
delay
|
|
2981
2981
|
});
|
|
2982
|
-
delay += rand3(
|
|
2982
|
+
delay += rand3(3e3, 4500);
|
|
2983
2983
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
2984
2984
|
if (decision.execute) {
|
|
2985
2985
|
entries.push({
|
|
@@ -2999,7 +2999,7 @@ var BotSimulationEngine = class {
|
|
|
2999
2999
|
},
|
|
3000
3000
|
delay
|
|
3001
3001
|
});
|
|
3002
|
-
delay += rand3(
|
|
3002
|
+
delay += rand3(2500, 4e3);
|
|
3003
3003
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
3004
3004
|
const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
|
|
3005
3005
|
entries.push({
|
|
@@ -3024,7 +3024,7 @@ var BotSimulationEngine = class {
|
|
|
3024
3024
|
},
|
|
3025
3025
|
delay
|
|
3026
3026
|
});
|
|
3027
|
-
delay += rand3(
|
|
3027
|
+
delay += rand3(4e3, 7e3);
|
|
3028
3028
|
const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
|
|
3029
3029
|
const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
|
|
3030
3030
|
entries.push({
|
|
@@ -3073,7 +3073,7 @@ var BotSimulationEngine = class {
|
|
|
3073
3073
|
}
|
|
3074
3074
|
}
|
|
3075
3075
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
3076
|
-
delay += rand3(
|
|
3076
|
+
delay += rand3(3500, 5500);
|
|
3077
3077
|
let totalPositionPnl = 0;
|
|
3078
3078
|
const pnlParts = [];
|
|
3079
3079
|
for (const pos of state.openPositions) {
|
|
@@ -3109,7 +3109,7 @@ var BotSimulationEngine = class {
|
|
|
3109
3109
|
});
|
|
3110
3110
|
}
|
|
3111
3111
|
if (Math.random() < 0.2) {
|
|
3112
|
-
delay += rand3(
|
|
3112
|
+
delay += rand3(3e3, 5e3);
|
|
3113
3113
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
3114
3114
|
const maxDrawdown = rand3(2, 12);
|
|
3115
3115
|
entries.push({
|