@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/index.mjs
CHANGED
|
@@ -968,9 +968,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
968
968
|
name: "Balanced Alpha",
|
|
969
969
|
shortName: "BAL",
|
|
970
970
|
color: "#3B82F6",
|
|
971
|
-
scanIntervalMin:
|
|
972
|
-
//
|
|
973
|
-
scanIntervalMax:
|
|
971
|
+
scanIntervalMin: 45e3,
|
|
972
|
+
// 45-70s between cycles (slower for readability)
|
|
973
|
+
scanIntervalMax: 7e4,
|
|
974
974
|
tradeFrequency: 0.4,
|
|
975
975
|
positionSizeMin: 15,
|
|
976
976
|
positionSizeMax: 35,
|
|
@@ -986,9 +986,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
986
986
|
name: "Conservative Shield",
|
|
987
987
|
shortName: "CON",
|
|
988
988
|
color: "#10B981",
|
|
989
|
-
scanIntervalMin:
|
|
990
|
-
//
|
|
991
|
-
scanIntervalMax:
|
|
989
|
+
scanIntervalMin: 6e4,
|
|
990
|
+
// 60-90s between cycles (slower for readability)
|
|
991
|
+
scanIntervalMax: 9e4,
|
|
992
992
|
tradeFrequency: 0.25,
|
|
993
993
|
positionSizeMin: 10,
|
|
994
994
|
positionSizeMax: 20,
|
|
@@ -1004,9 +1004,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
1004
1004
|
name: "Aggressive Momentum",
|
|
1005
1005
|
shortName: "AGG",
|
|
1006
1006
|
color: "#EF4444",
|
|
1007
|
-
scanIntervalMin:
|
|
1008
|
-
//
|
|
1009
|
-
scanIntervalMax:
|
|
1007
|
+
scanIntervalMin: 35e3,
|
|
1008
|
+
// 35-55s between cycles (slower for readability)
|
|
1009
|
+
scanIntervalMax: 55e3,
|
|
1010
1010
|
tradeFrequency: 0.5,
|
|
1011
1011
|
positionSizeMin: 25,
|
|
1012
1012
|
positionSizeMax: 50,
|
|
@@ -1236,7 +1236,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1236
1236
|
},
|
|
1237
1237
|
delay
|
|
1238
1238
|
});
|
|
1239
|
-
delay += rand3(
|
|
1239
|
+
delay += rand3(2e3, 3500);
|
|
1240
1240
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
1241
1241
|
for (const thinking of thinkingMessages) {
|
|
1242
1242
|
entries.push({
|
|
@@ -1249,7 +1249,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1249
1249
|
},
|
|
1250
1250
|
delay
|
|
1251
1251
|
});
|
|
1252
|
-
delay += rand3(
|
|
1252
|
+
delay += rand3(1500, 2500);
|
|
1253
1253
|
}
|
|
1254
1254
|
const indicatorParts = [];
|
|
1255
1255
|
if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
|
|
@@ -1281,7 +1281,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1281
1281
|
},
|
|
1282
1282
|
delay
|
|
1283
1283
|
});
|
|
1284
|
-
delay += rand3(
|
|
1284
|
+
delay += rand3(2e3, 3500);
|
|
1285
1285
|
if (Math.random() < 0.12) {
|
|
1286
1286
|
const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
|
|
1287
1287
|
entries.push({
|
|
@@ -1294,7 +1294,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1294
1294
|
},
|
|
1295
1295
|
delay
|
|
1296
1296
|
});
|
|
1297
|
-
delay += rand3(
|
|
1297
|
+
delay += rand3(2500, 4e3);
|
|
1298
1298
|
}
|
|
1299
1299
|
if (Math.random() < 0.4) {
|
|
1300
1300
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
@@ -1308,7 +1308,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1308
1308
|
},
|
|
1309
1309
|
delay
|
|
1310
1310
|
});
|
|
1311
|
-
delay += rand3(
|
|
1311
|
+
delay += rand3(2500, 4e3);
|
|
1312
1312
|
}
|
|
1313
1313
|
const signal = this.evaluateSignal(strategy, indicators);
|
|
1314
1314
|
state.lastSignal = signal.direction;
|
|
@@ -1332,7 +1332,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1332
1332
|
},
|
|
1333
1333
|
delay
|
|
1334
1334
|
});
|
|
1335
|
-
delay += rand3(
|
|
1335
|
+
delay += rand3(3e3, 5e3);
|
|
1336
1336
|
entries.push({
|
|
1337
1337
|
entry: {
|
|
1338
1338
|
strategyId: strategy.id,
|
|
@@ -1344,7 +1344,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1344
1344
|
},
|
|
1345
1345
|
delay
|
|
1346
1346
|
});
|
|
1347
|
-
delay += rand3(
|
|
1347
|
+
delay += rand3(3e3, 4500);
|
|
1348
1348
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
1349
1349
|
if (decision.execute) {
|
|
1350
1350
|
entries.push({
|
|
@@ -1364,7 +1364,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1364
1364
|
},
|
|
1365
1365
|
delay
|
|
1366
1366
|
});
|
|
1367
|
-
delay += rand3(
|
|
1367
|
+
delay += rand3(2500, 4e3);
|
|
1368
1368
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
1369
1369
|
const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
|
|
1370
1370
|
entries.push({
|
|
@@ -1389,7 +1389,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1389
1389
|
},
|
|
1390
1390
|
delay
|
|
1391
1391
|
});
|
|
1392
|
-
delay += rand3(
|
|
1392
|
+
delay += rand3(4e3, 7e3);
|
|
1393
1393
|
const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
|
|
1394
1394
|
const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
|
|
1395
1395
|
entries.push({
|
|
@@ -1438,7 +1438,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
1441
|
-
delay += rand3(
|
|
1441
|
+
delay += rand3(3500, 5500);
|
|
1442
1442
|
let totalPositionPnl = 0;
|
|
1443
1443
|
const pnlParts = [];
|
|
1444
1444
|
for (const pos of state.openPositions) {
|
|
@@ -1474,7 +1474,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1474
1474
|
});
|
|
1475
1475
|
}
|
|
1476
1476
|
if (Math.random() < 0.2) {
|
|
1477
|
-
delay += rand3(
|
|
1477
|
+
delay += rand3(3e3, 5e3);
|
|
1478
1478
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
1479
1479
|
const maxDrawdown = rand3(2, 12);
|
|
1480
1480
|
entries.push({
|