@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/hooks/index.mjs
CHANGED
|
@@ -959,9 +959,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
959
959
|
name: "Balanced Alpha",
|
|
960
960
|
shortName: "BAL",
|
|
961
961
|
color: "#3B82F6",
|
|
962
|
-
scanIntervalMin:
|
|
963
|
-
//
|
|
964
|
-
scanIntervalMax:
|
|
962
|
+
scanIntervalMin: 45e3,
|
|
963
|
+
// 45-70s between cycles (slower for readability)
|
|
964
|
+
scanIntervalMax: 7e4,
|
|
965
965
|
tradeFrequency: 0.4,
|
|
966
966
|
positionSizeMin: 15,
|
|
967
967
|
positionSizeMax: 35,
|
|
@@ -977,9 +977,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
977
977
|
name: "Conservative Shield",
|
|
978
978
|
shortName: "CON",
|
|
979
979
|
color: "#10B981",
|
|
980
|
-
scanIntervalMin:
|
|
981
|
-
//
|
|
982
|
-
scanIntervalMax:
|
|
980
|
+
scanIntervalMin: 6e4,
|
|
981
|
+
// 60-90s between cycles (slower for readability)
|
|
982
|
+
scanIntervalMax: 9e4,
|
|
983
983
|
tradeFrequency: 0.25,
|
|
984
984
|
positionSizeMin: 10,
|
|
985
985
|
positionSizeMax: 20,
|
|
@@ -995,9 +995,9 @@ var init_BotSimulationEngine = __esm({
|
|
|
995
995
|
name: "Aggressive Momentum",
|
|
996
996
|
shortName: "AGG",
|
|
997
997
|
color: "#EF4444",
|
|
998
|
-
scanIntervalMin:
|
|
999
|
-
//
|
|
1000
|
-
scanIntervalMax:
|
|
998
|
+
scanIntervalMin: 35e3,
|
|
999
|
+
// 35-55s between cycles (slower for readability)
|
|
1000
|
+
scanIntervalMax: 55e3,
|
|
1001
1001
|
tradeFrequency: 0.5,
|
|
1002
1002
|
positionSizeMin: 25,
|
|
1003
1003
|
positionSizeMax: 50,
|
|
@@ -1227,7 +1227,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1227
1227
|
},
|
|
1228
1228
|
delay
|
|
1229
1229
|
});
|
|
1230
|
-
delay += rand3(
|
|
1230
|
+
delay += rand3(2e3, 3500);
|
|
1231
1231
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
1232
1232
|
for (const thinking of thinkingMessages) {
|
|
1233
1233
|
entries.push({
|
|
@@ -1240,7 +1240,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1240
1240
|
},
|
|
1241
1241
|
delay
|
|
1242
1242
|
});
|
|
1243
|
-
delay += rand3(
|
|
1243
|
+
delay += rand3(1500, 2500);
|
|
1244
1244
|
}
|
|
1245
1245
|
const indicatorParts = [];
|
|
1246
1246
|
if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
|
|
@@ -1272,7 +1272,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1272
1272
|
},
|
|
1273
1273
|
delay
|
|
1274
1274
|
});
|
|
1275
|
-
delay += rand3(
|
|
1275
|
+
delay += rand3(2e3, 3500);
|
|
1276
1276
|
if (Math.random() < 0.12) {
|
|
1277
1277
|
const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
|
|
1278
1278
|
entries.push({
|
|
@@ -1285,7 +1285,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1285
1285
|
},
|
|
1286
1286
|
delay
|
|
1287
1287
|
});
|
|
1288
|
-
delay += rand3(
|
|
1288
|
+
delay += rand3(2500, 4e3);
|
|
1289
1289
|
}
|
|
1290
1290
|
if (Math.random() < 0.4) {
|
|
1291
1291
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
@@ -1299,7 +1299,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1299
1299
|
},
|
|
1300
1300
|
delay
|
|
1301
1301
|
});
|
|
1302
|
-
delay += rand3(
|
|
1302
|
+
delay += rand3(2500, 4e3);
|
|
1303
1303
|
}
|
|
1304
1304
|
const signal = this.evaluateSignal(strategy, indicators);
|
|
1305
1305
|
state.lastSignal = signal.direction;
|
|
@@ -1323,7 +1323,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1323
1323
|
},
|
|
1324
1324
|
delay
|
|
1325
1325
|
});
|
|
1326
|
-
delay += rand3(
|
|
1326
|
+
delay += rand3(3e3, 5e3);
|
|
1327
1327
|
entries.push({
|
|
1328
1328
|
entry: {
|
|
1329
1329
|
strategyId: strategy.id,
|
|
@@ -1335,7 +1335,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1335
1335
|
},
|
|
1336
1336
|
delay
|
|
1337
1337
|
});
|
|
1338
|
-
delay += rand3(
|
|
1338
|
+
delay += rand3(3e3, 4500);
|
|
1339
1339
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
1340
1340
|
if (decision.execute) {
|
|
1341
1341
|
entries.push({
|
|
@@ -1355,7 +1355,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1355
1355
|
},
|
|
1356
1356
|
delay
|
|
1357
1357
|
});
|
|
1358
|
-
delay += rand3(
|
|
1358
|
+
delay += rand3(2500, 4e3);
|
|
1359
1359
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
1360
1360
|
const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
|
|
1361
1361
|
entries.push({
|
|
@@ -1380,7 +1380,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1380
1380
|
},
|
|
1381
1381
|
delay
|
|
1382
1382
|
});
|
|
1383
|
-
delay += rand3(
|
|
1383
|
+
delay += rand3(4e3, 7e3);
|
|
1384
1384
|
const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
|
|
1385
1385
|
const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
|
|
1386
1386
|
entries.push({
|
|
@@ -1429,7 +1429,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
1432
|
-
delay += rand3(
|
|
1432
|
+
delay += rand3(3500, 5500);
|
|
1433
1433
|
let totalPositionPnl = 0;
|
|
1434
1434
|
const pnlParts = [];
|
|
1435
1435
|
for (const pos of state.openPositions) {
|
|
@@ -1465,7 +1465,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1465
1465
|
});
|
|
1466
1466
|
}
|
|
1467
1467
|
if (Math.random() < 0.2) {
|
|
1468
|
-
delay += rand3(
|
|
1468
|
+
delay += rand3(3e3, 5e3);
|
|
1469
1469
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
1470
1470
|
const maxDrawdown = rand3(2, 12);
|
|
1471
1471
|
entries.push({
|