@one_deploy/sdk 1.2.0 → 1.2.2
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/{ForexPoolDataGenerator--__twRwl.d.mts → ForexPoolDataGenerator-JxTPpJPz.d.mts} +1 -1
- package/dist/{ForexPoolDataGenerator-eUgwsU_B.d.ts → ForexPoolDataGenerator-qwWv6sCE.d.ts} +1 -1
- package/dist/{OneForexTradeHistory-TlKxjbFF.d.ts → OneForexTradeHistory-BE4rJH5t.d.ts} +1 -1
- package/dist/{OneForexTradeHistory-iDySMcw0.d.mts → OneForexTradeHistory-DbuHXRy0.d.mts} +1 -1
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{console-BfTMA7ah.d.mts → console-Dvf-N9Gr.d.mts} +7 -0
- package/dist/{console-BfTMA7ah.d.ts → console-Dvf-N9Gr.d.ts} +7 -0
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +399 -38
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +399 -38
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +399 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +399 -38
- package/dist/index.mjs.map +1 -1
- package/dist/providers/index.d.mts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/react-native.d.mts +4 -4
- package/dist/react-native.d.ts +4 -4
- package/dist/react-native.js +239 -36
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +239 -36
- package/dist/react-native.mjs.map +1 -1
- package/dist/services/index.d.mts +2 -2
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.js +239 -36
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +239 -36
- package/dist/services/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{useForexTrading-ZgW_G40Q.d.ts → useForexTrading-CA2DPQVf.d.ts} +1 -1
- package/dist/{useForexTrading-BleeSor8.d.mts → useForexTrading-I7nIQyog.d.mts} +1 -1
- package/package.json +1 -1
- package/src/services/forex/BotSimulationEngine.ts +463 -35
- package/src/services/forex/index.ts +12 -1
package/dist/index.mjs
CHANGED
|
@@ -936,9 +936,39 @@ var init_ForexSimulationEngine = __esm({
|
|
|
936
936
|
// src/services/forex/BotSimulationEngine.ts
|
|
937
937
|
var BotSimulationEngine_exports = {};
|
|
938
938
|
__export(BotSimulationEngine_exports, {
|
|
939
|
+
INVESTMENT_CYCLES: () => INVESTMENT_CYCLES,
|
|
940
|
+
INVESTMENT_TIERS: () => INVESTMENT_TIERS,
|
|
939
941
|
STRATEGY_PERSONALITIES: () => STRATEGY_PERSONALITIES,
|
|
940
|
-
botSimulationEngine: () => botSimulationEngine
|
|
942
|
+
botSimulationEngine: () => botSimulationEngine,
|
|
943
|
+
calculateDailyYield: () => calculateDailyYield,
|
|
944
|
+
estimateReturns: () => estimateReturns
|
|
941
945
|
});
|
|
946
|
+
function calculateDailyYield(strategy, tier, cycle) {
|
|
947
|
+
const baseYield = (strategy.dailyYieldMin + strategy.dailyYieldMax) / 2;
|
|
948
|
+
const tierBonuses = {
|
|
949
|
+
starter: 0,
|
|
950
|
+
basic: 0.02,
|
|
951
|
+
standard: 0.05,
|
|
952
|
+
premium: 0.08,
|
|
953
|
+
elite: 0.12,
|
|
954
|
+
vip: 0.15
|
|
955
|
+
};
|
|
956
|
+
const grossYield = baseYield * cycle.bonusMultiplier * (1 + tierBonuses[tier]);
|
|
957
|
+
const platformFee = grossYield * (cycle.profitSharePercent / 100);
|
|
958
|
+
const netYield = grossYield - platformFee;
|
|
959
|
+
return { grossYield, netYield, platformFee };
|
|
960
|
+
}
|
|
961
|
+
function estimateReturns(principal, strategy, tier, cycle) {
|
|
962
|
+
const { netYield, platformFee } = calculateDailyYield(strategy, tier, cycle);
|
|
963
|
+
const days = cycle.days || 30;
|
|
964
|
+
const dailyReturn = principal * (netYield / 100);
|
|
965
|
+
const totalReturn = dailyReturn * days;
|
|
966
|
+
const finalAmount = principal + totalReturn;
|
|
967
|
+
const platformProfit = principal * (platformFee / 100) * days;
|
|
968
|
+
const userProfit = totalReturn;
|
|
969
|
+
const apr = netYield * 365;
|
|
970
|
+
return { dailyReturn, totalReturn, finalAmount, platformProfit, userProfit, apr };
|
|
971
|
+
}
|
|
942
972
|
function genId3() {
|
|
943
973
|
return `log_${Date.now()}_${++idCounter2}`;
|
|
944
974
|
}
|
|
@@ -959,18 +989,195 @@ function formatPrice(price) {
|
|
|
959
989
|
if (price >= 1) return price.toFixed(3);
|
|
960
990
|
return price.toFixed(5);
|
|
961
991
|
}
|
|
962
|
-
var STRATEGY_PERSONALITIES, PAIR_PRICES, CHAIN_INFO, NEWS_HEADLINES, idCounter2, BotSimulationEngine, botSimulationEngine;
|
|
992
|
+
var INVESTMENT_TIERS, INVESTMENT_CYCLES, STRATEGY_PERSONALITIES, PAIR_PRICES, CHAIN_INFO, NEWS_HEADLINES, idCounter2, BotSimulationEngine, botSimulationEngine;
|
|
963
993
|
var init_BotSimulationEngine = __esm({
|
|
964
994
|
"src/services/forex/BotSimulationEngine.ts"() {
|
|
995
|
+
INVESTMENT_TIERS = {
|
|
996
|
+
starter: {
|
|
997
|
+
id: "starter",
|
|
998
|
+
name: "Starter",
|
|
999
|
+
nameCn: "\u5165\u95E8\u7248",
|
|
1000
|
+
minInvestment: 100,
|
|
1001
|
+
maxInvestment: 999,
|
|
1002
|
+
color: "#6B7280",
|
|
1003
|
+
icon: "\u{1F331}"
|
|
1004
|
+
},
|
|
1005
|
+
basic: {
|
|
1006
|
+
id: "basic",
|
|
1007
|
+
name: "Basic",
|
|
1008
|
+
nameCn: "\u57FA\u7840\u7248",
|
|
1009
|
+
minInvestment: 1e3,
|
|
1010
|
+
maxInvestment: 4999,
|
|
1011
|
+
color: "#3B82F6",
|
|
1012
|
+
icon: "\u{1F4CA}"
|
|
1013
|
+
},
|
|
1014
|
+
standard: {
|
|
1015
|
+
id: "standard",
|
|
1016
|
+
name: "Standard",
|
|
1017
|
+
nameCn: "\u6807\u51C6\u7248",
|
|
1018
|
+
minInvestment: 5e3,
|
|
1019
|
+
maxInvestment: 19999,
|
|
1020
|
+
color: "#10B981",
|
|
1021
|
+
icon: "\u{1F48E}"
|
|
1022
|
+
},
|
|
1023
|
+
premium: {
|
|
1024
|
+
id: "premium",
|
|
1025
|
+
name: "Premium",
|
|
1026
|
+
nameCn: "\u9AD8\u7EA7\u7248",
|
|
1027
|
+
minInvestment: 2e4,
|
|
1028
|
+
maxInvestment: 49999,
|
|
1029
|
+
color: "#8B5CF6",
|
|
1030
|
+
icon: "\u{1F451}"
|
|
1031
|
+
},
|
|
1032
|
+
elite: {
|
|
1033
|
+
id: "elite",
|
|
1034
|
+
name: "Elite",
|
|
1035
|
+
nameCn: "\u7CBE\u82F1\u7248",
|
|
1036
|
+
minInvestment: 5e4,
|
|
1037
|
+
maxInvestment: 99999,
|
|
1038
|
+
color: "#F59E0B",
|
|
1039
|
+
icon: "\u{1F3C6}"
|
|
1040
|
+
},
|
|
1041
|
+
vip: {
|
|
1042
|
+
id: "vip",
|
|
1043
|
+
name: "VIP",
|
|
1044
|
+
nameCn: "VIP\u4E13\u5C5E",
|
|
1045
|
+
minInvestment: 1e5,
|
|
1046
|
+
maxInvestment: Infinity,
|
|
1047
|
+
color: "#EF4444",
|
|
1048
|
+
icon: "\u{1F525}"
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
INVESTMENT_CYCLES = [
|
|
1052
|
+
{
|
|
1053
|
+
id: "flexible",
|
|
1054
|
+
days: 0,
|
|
1055
|
+
name: "Flexible",
|
|
1056
|
+
nameCn: "\u7075\u6D3B\u671F",
|
|
1057
|
+
profitSharePercent: 30,
|
|
1058
|
+
// Platform 30%, User 70%
|
|
1059
|
+
bonusMultiplier: 1,
|
|
1060
|
+
earlyWithdrawPenalty: 0
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
id: "week",
|
|
1064
|
+
days: 7,
|
|
1065
|
+
name: "7 Days",
|
|
1066
|
+
nameCn: "7\u5929\u671F",
|
|
1067
|
+
profitSharePercent: 25,
|
|
1068
|
+
// Platform 25%, User 75%
|
|
1069
|
+
bonusMultiplier: 1.1,
|
|
1070
|
+
earlyWithdrawPenalty: 5
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
id: "biweek",
|
|
1074
|
+
days: 14,
|
|
1075
|
+
name: "14 Days",
|
|
1076
|
+
nameCn: "14\u5929\u671F",
|
|
1077
|
+
profitSharePercent: 22,
|
|
1078
|
+
// Platform 22%, User 78%
|
|
1079
|
+
bonusMultiplier: 1.2,
|
|
1080
|
+
earlyWithdrawPenalty: 8
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
id: "month",
|
|
1084
|
+
days: 30,
|
|
1085
|
+
name: "30 Days",
|
|
1086
|
+
nameCn: "30\u5929\u671F",
|
|
1087
|
+
profitSharePercent: 20,
|
|
1088
|
+
// Platform 20%, User 80%
|
|
1089
|
+
bonusMultiplier: 1.35,
|
|
1090
|
+
earlyWithdrawPenalty: 10
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
id: "quarter",
|
|
1094
|
+
days: 90,
|
|
1095
|
+
name: "90 Days",
|
|
1096
|
+
nameCn: "90\u5929\u671F",
|
|
1097
|
+
profitSharePercent: 15,
|
|
1098
|
+
// Platform 15%, User 85%
|
|
1099
|
+
bonusMultiplier: 1.5,
|
|
1100
|
+
earlyWithdrawPenalty: 15
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
id: "halfyear",
|
|
1104
|
+
days: 180,
|
|
1105
|
+
name: "180 Days",
|
|
1106
|
+
nameCn: "180\u5929\u671F",
|
|
1107
|
+
profitSharePercent: 12,
|
|
1108
|
+
// Platform 12%, User 88%
|
|
1109
|
+
bonusMultiplier: 1.8,
|
|
1110
|
+
earlyWithdrawPenalty: 20
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
id: "year",
|
|
1114
|
+
days: 365,
|
|
1115
|
+
name: "365 Days",
|
|
1116
|
+
nameCn: "365\u5929\u671F",
|
|
1117
|
+
profitSharePercent: 10,
|
|
1118
|
+
// Platform 10%, User 90%
|
|
1119
|
+
bonusMultiplier: 2,
|
|
1120
|
+
earlyWithdrawPenalty: 25
|
|
1121
|
+
}
|
|
1122
|
+
];
|
|
965
1123
|
STRATEGY_PERSONALITIES = [
|
|
1124
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1125
|
+
// CONSERVATIVE STRATEGIES (保守型) - Low risk, stable returns
|
|
1126
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1127
|
+
{
|
|
1128
|
+
id: "stable-yield-01",
|
|
1129
|
+
name: "Stable Yield",
|
|
1130
|
+
shortName: "STB",
|
|
1131
|
+
color: "#6B7280",
|
|
1132
|
+
scanIntervalMin: 8e4,
|
|
1133
|
+
scanIntervalMax: 12e4,
|
|
1134
|
+
tradeFrequency: 0.15,
|
|
1135
|
+
positionSizeMin: 5,
|
|
1136
|
+
positionSizeMax: 15,
|
|
1137
|
+
leverageMin: 1,
|
|
1138
|
+
leverageMax: 3,
|
|
1139
|
+
primaryIndicators: ["Bollinger", "Volume"],
|
|
1140
|
+
riskTolerance: "low",
|
|
1141
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT"],
|
|
1142
|
+
rsiBias: 45,
|
|
1143
|
+
tier: "starter",
|
|
1144
|
+
dailyYieldMin: 0.15,
|
|
1145
|
+
dailyYieldMax: 0.25,
|
|
1146
|
+
description: "\u7A33\u5065\u6536\u76CA\u7B56\u7565\uFF0C\u4F4E\u98CE\u9669\u4F4E\u6CE2\u52A8\uFF0C\u9002\u5408\u65B0\u624B\u5165\u95E8",
|
|
1147
|
+
category: "conservative"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
id: "conservative-shield-01",
|
|
1151
|
+
name: "Conservative Shield",
|
|
1152
|
+
shortName: "CON",
|
|
1153
|
+
color: "#10B981",
|
|
1154
|
+
scanIntervalMin: 6e4,
|
|
1155
|
+
scanIntervalMax: 9e4,
|
|
1156
|
+
tradeFrequency: 0.25,
|
|
1157
|
+
positionSizeMin: 10,
|
|
1158
|
+
positionSizeMax: 20,
|
|
1159
|
+
leverageMin: 2,
|
|
1160
|
+
leverageMax: 5,
|
|
1161
|
+
primaryIndicators: ["Bollinger", "Volume", "RSI"],
|
|
1162
|
+
riskTolerance: "low",
|
|
1163
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT"],
|
|
1164
|
+
rsiBias: 45,
|
|
1165
|
+
tier: "basic",
|
|
1166
|
+
dailyYieldMin: 0.25,
|
|
1167
|
+
dailyYieldMax: 0.4,
|
|
1168
|
+
description: "\u4FDD\u5B88\u9632\u5FA1\u7B56\u7565\uFF0C\u6CE8\u91CD\u8D44\u91D1\u5B89\u5168\uFF0C\u7A33\u5B9A\u6536\u76CA",
|
|
1169
|
+
category: "conservative"
|
|
1170
|
+
},
|
|
1171
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1172
|
+
// BALANCED STRATEGIES (平衡型) - Moderate risk, balanced returns
|
|
1173
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
966
1174
|
{
|
|
967
|
-
id: "balanced-01",
|
|
1175
|
+
id: "balanced-alpha-01",
|
|
968
1176
|
name: "Balanced Alpha",
|
|
969
1177
|
shortName: "BAL",
|
|
970
1178
|
color: "#3B82F6",
|
|
971
|
-
scanIntervalMin:
|
|
972
|
-
|
|
973
|
-
scanIntervalMax: 4e4,
|
|
1179
|
+
scanIntervalMin: 45e3,
|
|
1180
|
+
scanIntervalMax: 7e4,
|
|
974
1181
|
tradeFrequency: 0.4,
|
|
975
1182
|
positionSizeMin: 15,
|
|
976
1183
|
positionSizeMax: 35,
|
|
@@ -979,34 +1186,92 @@ var init_BotSimulationEngine = __esm({
|
|
|
979
1186
|
primaryIndicators: ["RSI", "MACD"],
|
|
980
1187
|
riskTolerance: "medium",
|
|
981
1188
|
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT"],
|
|
982
|
-
rsiBias: 50
|
|
1189
|
+
rsiBias: 50,
|
|
1190
|
+
tier: "standard",
|
|
1191
|
+
dailyYieldMin: 0.4,
|
|
1192
|
+
dailyYieldMax: 0.65,
|
|
1193
|
+
description: "\u5E73\u8861\u578B\u7B56\u7565\uFF0C\u98CE\u9669\u6536\u76CA\u5747\u8861\uFF0C\u9002\u5408\u7A33\u5065\u6295\u8D44\u8005",
|
|
1194
|
+
category: "balanced"
|
|
983
1195
|
},
|
|
984
1196
|
{
|
|
985
|
-
id: "
|
|
986
|
-
name: "
|
|
987
|
-
shortName: "
|
|
988
|
-
color: "#
|
|
989
|
-
scanIntervalMin:
|
|
990
|
-
|
|
1197
|
+
id: "smart-rebalance-01",
|
|
1198
|
+
name: "Smart Rebalance",
|
|
1199
|
+
shortName: "SRB",
|
|
1200
|
+
color: "#06B6D4",
|
|
1201
|
+
scanIntervalMin: 5e4,
|
|
1202
|
+
scanIntervalMax: 75e3,
|
|
1203
|
+
tradeFrequency: 0.35,
|
|
1204
|
+
positionSizeMin: 12,
|
|
1205
|
+
positionSizeMax: 30,
|
|
1206
|
+
leverageMin: 3,
|
|
1207
|
+
leverageMax: 8,
|
|
1208
|
+
primaryIndicators: ["RSI", "EMA", "Volume"],
|
|
1209
|
+
riskTolerance: "medium",
|
|
1210
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "BNB/USDT", "SOL/USDT"],
|
|
1211
|
+
rsiBias: 50,
|
|
1212
|
+
tier: "standard",
|
|
1213
|
+
dailyYieldMin: 0.45,
|
|
1214
|
+
dailyYieldMax: 0.7,
|
|
1215
|
+
description: "\u667A\u80FD\u518D\u5E73\u8861\u7B56\u7565\uFF0C\u52A8\u6001\u8C03\u6574\u6301\u4ED3\uFF0C\u4F18\u5316\u6536\u76CA",
|
|
1216
|
+
category: "balanced"
|
|
1217
|
+
},
|
|
1218
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1219
|
+
// GROWTH STRATEGIES (成长型) - Higher risk, higher returns
|
|
1220
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1221
|
+
{
|
|
1222
|
+
id: "growth-momentum-01",
|
|
1223
|
+
name: "Growth Momentum",
|
|
1224
|
+
shortName: "GRO",
|
|
1225
|
+
color: "#8B5CF6",
|
|
1226
|
+
scanIntervalMin: 4e4,
|
|
1227
|
+
scanIntervalMax: 6e4,
|
|
1228
|
+
tradeFrequency: 0.45,
|
|
1229
|
+
positionSizeMin: 20,
|
|
1230
|
+
positionSizeMax: 40,
|
|
1231
|
+
leverageMin: 5,
|
|
1232
|
+
leverageMax: 12,
|
|
1233
|
+
primaryIndicators: ["RSI", "MACD", "EMA"],
|
|
1234
|
+
riskTolerance: "medium",
|
|
1235
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT"],
|
|
1236
|
+
rsiBias: 52,
|
|
1237
|
+
tier: "premium",
|
|
1238
|
+
dailyYieldMin: 0.6,
|
|
1239
|
+
dailyYieldMax: 0.95,
|
|
1240
|
+
description: "\u6210\u957F\u52A8\u91CF\u7B56\u7565\uFF0C\u8FFD\u6C42\u8F83\u9AD8\u6536\u76CA\uFF0C\u9002\u5408\u6709\u7ECF\u9A8C\u6295\u8D44\u8005",
|
|
1241
|
+
category: "growth"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
id: "trend-hunter-01",
|
|
1245
|
+
name: "Trend Hunter",
|
|
1246
|
+
shortName: "TRH",
|
|
1247
|
+
color: "#EC4899",
|
|
1248
|
+
scanIntervalMin: 38e3,
|
|
991
1249
|
scanIntervalMax: 55e3,
|
|
992
|
-
tradeFrequency: 0.
|
|
993
|
-
positionSizeMin:
|
|
994
|
-
positionSizeMax:
|
|
995
|
-
leverageMin:
|
|
996
|
-
leverageMax:
|
|
997
|
-
primaryIndicators: ["
|
|
998
|
-
riskTolerance: "
|
|
999
|
-
preferredPairs: ["BTC/USDT", "ETH/USDT"],
|
|
1000
|
-
rsiBias:
|
|
1250
|
+
tradeFrequency: 0.48,
|
|
1251
|
+
positionSizeMin: 22,
|
|
1252
|
+
positionSizeMax: 42,
|
|
1253
|
+
leverageMin: 5,
|
|
1254
|
+
leverageMax: 15,
|
|
1255
|
+
primaryIndicators: ["EMA", "MACD", "Volume", "Bollinger"],
|
|
1256
|
+
riskTolerance: "medium",
|
|
1257
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "ARB/USDT", "OP/USDT"],
|
|
1258
|
+
rsiBias: 53,
|
|
1259
|
+
tier: "premium",
|
|
1260
|
+
dailyYieldMin: 0.65,
|
|
1261
|
+
dailyYieldMax: 1,
|
|
1262
|
+
description: "\u8D8B\u52BF\u730E\u624B\u7B56\u7565\uFF0C\u6355\u6349\u5E02\u573A\u8D8B\u52BF\uFF0C\u8FFD\u6C42\u8D85\u989D\u6536\u76CA",
|
|
1263
|
+
category: "growth"
|
|
1001
1264
|
},
|
|
1265
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1266
|
+
// AGGRESSIVE STRATEGIES (激进型) - High risk, high returns
|
|
1267
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1002
1268
|
{
|
|
1003
|
-
id: "aggressive-01",
|
|
1269
|
+
id: "aggressive-momentum-01",
|
|
1004
1270
|
name: "Aggressive Momentum",
|
|
1005
1271
|
shortName: "AGG",
|
|
1006
1272
|
color: "#EF4444",
|
|
1007
|
-
scanIntervalMin:
|
|
1008
|
-
|
|
1009
|
-
scanIntervalMax: 3e4,
|
|
1273
|
+
scanIntervalMin: 35e3,
|
|
1274
|
+
scanIntervalMax: 55e3,
|
|
1010
1275
|
tradeFrequency: 0.5,
|
|
1011
1276
|
positionSizeMin: 25,
|
|
1012
1277
|
positionSizeMax: 50,
|
|
@@ -1015,7 +1280,103 @@ var init_BotSimulationEngine = __esm({
|
|
|
1015
1280
|
primaryIndicators: ["RSI", "MACD", "EMA", "Volume"],
|
|
1016
1281
|
riskTolerance: "high",
|
|
1017
1282
|
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT"],
|
|
1018
|
-
rsiBias: 55
|
|
1283
|
+
rsiBias: 55,
|
|
1284
|
+
tier: "elite",
|
|
1285
|
+
dailyYieldMin: 0.85,
|
|
1286
|
+
dailyYieldMax: 1.4,
|
|
1287
|
+
description: "\u6FC0\u8FDB\u52A8\u91CF\u7B56\u7565\uFF0C\u9AD8\u98CE\u9669\u9AD8\u6536\u76CA\uFF0C\u9002\u5408\u98CE\u9669\u627F\u53D7\u80FD\u529B\u5F3A\u7684\u6295\u8D44\u8005",
|
|
1288
|
+
category: "aggressive"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
id: "leverage-maximizer-01",
|
|
1292
|
+
name: "Leverage Maximizer",
|
|
1293
|
+
shortName: "LEV",
|
|
1294
|
+
color: "#F97316",
|
|
1295
|
+
scanIntervalMin: 3e4,
|
|
1296
|
+
scanIntervalMax: 5e4,
|
|
1297
|
+
tradeFrequency: 0.55,
|
|
1298
|
+
positionSizeMin: 30,
|
|
1299
|
+
positionSizeMax: 55,
|
|
1300
|
+
leverageMin: 10,
|
|
1301
|
+
leverageMax: 25,
|
|
1302
|
+
primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
|
|
1303
|
+
riskTolerance: "high",
|
|
1304
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "DOGE/USDT", "AVAX/USDT", "ARB/USDT"],
|
|
1305
|
+
rsiBias: 55,
|
|
1306
|
+
tier: "elite",
|
|
1307
|
+
dailyYieldMin: 1,
|
|
1308
|
+
dailyYieldMax: 1.8,
|
|
1309
|
+
description: "\u6760\u6746\u6700\u5927\u5316\u7B56\u7565\uFF0C\u8FFD\u6C42\u6781\u81F4\u6536\u76CA\uFF0C\u9700\u8981\u4E13\u4E1A\u6295\u8D44\u7ECF\u9A8C",
|
|
1310
|
+
category: "aggressive"
|
|
1311
|
+
},
|
|
1312
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1313
|
+
// QUANTITATIVE STRATEGIES (量化型) - AI-driven, advanced algorithms
|
|
1314
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1315
|
+
{
|
|
1316
|
+
id: "ai-quant-alpha-01",
|
|
1317
|
+
name: "AI Quant Alpha",
|
|
1318
|
+
shortName: "AQA",
|
|
1319
|
+
color: "#A855F7",
|
|
1320
|
+
scanIntervalMin: 42e3,
|
|
1321
|
+
scanIntervalMax: 65e3,
|
|
1322
|
+
tradeFrequency: 0.42,
|
|
1323
|
+
positionSizeMin: 18,
|
|
1324
|
+
positionSizeMax: 38,
|
|
1325
|
+
leverageMin: 4,
|
|
1326
|
+
leverageMax: 12,
|
|
1327
|
+
primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
|
|
1328
|
+
riskTolerance: "medium",
|
|
1329
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "BNB/USDT"],
|
|
1330
|
+
rsiBias: 51,
|
|
1331
|
+
tier: "premium",
|
|
1332
|
+
dailyYieldMin: 0.7,
|
|
1333
|
+
dailyYieldMax: 1.1,
|
|
1334
|
+
description: "AI\u91CF\u5316Alpha\u7B56\u7565\uFF0C\u673A\u5668\u5B66\u4E60\u9A71\u52A8\uFF0C\u667A\u80FD\u98CE\u63A7",
|
|
1335
|
+
category: "quantitative"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
id: "neural-trader-01",
|
|
1339
|
+
name: "Neural Trader",
|
|
1340
|
+
shortName: "NRT",
|
|
1341
|
+
color: "#14B8A6",
|
|
1342
|
+
scanIntervalMin: 4e4,
|
|
1343
|
+
scanIntervalMax: 62e3,
|
|
1344
|
+
tradeFrequency: 0.44,
|
|
1345
|
+
positionSizeMin: 20,
|
|
1346
|
+
positionSizeMax: 40,
|
|
1347
|
+
leverageMin: 5,
|
|
1348
|
+
leverageMax: 15,
|
|
1349
|
+
primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
|
|
1350
|
+
riskTolerance: "medium",
|
|
1351
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "LINK/USDT"],
|
|
1352
|
+
rsiBias: 52,
|
|
1353
|
+
tier: "elite",
|
|
1354
|
+
dailyYieldMin: 0.8,
|
|
1355
|
+
dailyYieldMax: 1.25,
|
|
1356
|
+
description: "\u795E\u7ECF\u7F51\u7EDC\u4EA4\u6613\u7B56\u7565\uFF0C\u6DF1\u5EA6\u5B66\u4E60\u6A21\u578B\uFF0C\u81EA\u9002\u5E94\u5E02\u573A",
|
|
1357
|
+
category: "quantitative"
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
id: "quantum-edge-01",
|
|
1361
|
+
name: "Quantum Edge",
|
|
1362
|
+
shortName: "QTE",
|
|
1363
|
+
color: "#6366F1",
|
|
1364
|
+
scanIntervalMin: 35e3,
|
|
1365
|
+
scanIntervalMax: 55e3,
|
|
1366
|
+
tradeFrequency: 0.5,
|
|
1367
|
+
positionSizeMin: 25,
|
|
1368
|
+
positionSizeMax: 50,
|
|
1369
|
+
leverageMin: 8,
|
|
1370
|
+
leverageMax: 20,
|
|
1371
|
+
primaryIndicators: ["RSI", "MACD", "EMA", "Volume", "Bollinger"],
|
|
1372
|
+
riskTolerance: "high",
|
|
1373
|
+
preferredPairs: ["BTC/USDT", "ETH/USDT", "SOL/USDT", "AVAX/USDT", "ARB/USDT", "OP/USDT"],
|
|
1374
|
+
rsiBias: 54,
|
|
1375
|
+
tier: "vip",
|
|
1376
|
+
dailyYieldMin: 1.2,
|
|
1377
|
+
dailyYieldMax: 2,
|
|
1378
|
+
description: "VIP\u91CF\u5B50\u4F18\u52BF\u7B56\u7565\uFF0C\u9876\u7EA7AI\u7B97\u6CD5\uFF0C\u6781\u81F4\u6536\u76CA\u8FFD\u6C42",
|
|
1379
|
+
category: "quantitative"
|
|
1019
1380
|
}
|
|
1020
1381
|
];
|
|
1021
1382
|
PAIR_PRICES = {
|
|
@@ -1236,7 +1597,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1236
1597
|
},
|
|
1237
1598
|
delay
|
|
1238
1599
|
});
|
|
1239
|
-
delay += rand3(
|
|
1600
|
+
delay += rand3(2e3, 3500);
|
|
1240
1601
|
const thinkingMessages = this.generateThinkingProcess(strategy, pair, price);
|
|
1241
1602
|
for (const thinking of thinkingMessages) {
|
|
1242
1603
|
entries.push({
|
|
@@ -1249,7 +1610,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1249
1610
|
},
|
|
1250
1611
|
delay
|
|
1251
1612
|
});
|
|
1252
|
-
delay += rand3(
|
|
1613
|
+
delay += rand3(1500, 2500);
|
|
1253
1614
|
}
|
|
1254
1615
|
const indicatorParts = [];
|
|
1255
1616
|
if (strategy.primaryIndicators.includes("RSI") || strategy.primaryIndicators.includes("MACD")) {
|
|
@@ -1281,7 +1642,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1281
1642
|
},
|
|
1282
1643
|
delay
|
|
1283
1644
|
});
|
|
1284
|
-
delay += rand3(
|
|
1645
|
+
delay += rand3(2e3, 3500);
|
|
1285
1646
|
if (Math.random() < 0.12) {
|
|
1286
1647
|
const sentiment = Math.random() > 0.4 ? "Bullish" : "Bearish";
|
|
1287
1648
|
entries.push({
|
|
@@ -1294,7 +1655,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1294
1655
|
},
|
|
1295
1656
|
delay
|
|
1296
1657
|
});
|
|
1297
|
-
delay += rand3(
|
|
1658
|
+
delay += rand3(2500, 4e3);
|
|
1298
1659
|
}
|
|
1299
1660
|
if (Math.random() < 0.4) {
|
|
1300
1661
|
const analysis = this.generateAnalysis(strategy, indicators, pair);
|
|
@@ -1308,7 +1669,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1308
1669
|
},
|
|
1309
1670
|
delay
|
|
1310
1671
|
});
|
|
1311
|
-
delay += rand3(
|
|
1672
|
+
delay += rand3(2500, 4e3);
|
|
1312
1673
|
}
|
|
1313
1674
|
const signal = this.evaluateSignal(strategy, indicators);
|
|
1314
1675
|
state.lastSignal = signal.direction;
|
|
@@ -1332,7 +1693,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1332
1693
|
},
|
|
1333
1694
|
delay
|
|
1334
1695
|
});
|
|
1335
|
-
delay += rand3(
|
|
1696
|
+
delay += rand3(3e3, 5e3);
|
|
1336
1697
|
entries.push({
|
|
1337
1698
|
entry: {
|
|
1338
1699
|
strategyId: strategy.id,
|
|
@@ -1344,7 +1705,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1344
1705
|
},
|
|
1345
1706
|
delay
|
|
1346
1707
|
});
|
|
1347
|
-
delay += rand3(
|
|
1708
|
+
delay += rand3(3e3, 4500);
|
|
1348
1709
|
const decision = this.makeTradeDecision(strategy, signal, state);
|
|
1349
1710
|
if (decision.execute) {
|
|
1350
1711
|
entries.push({
|
|
@@ -1364,7 +1725,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1364
1725
|
},
|
|
1365
1726
|
delay
|
|
1366
1727
|
});
|
|
1367
|
-
delay += rand3(
|
|
1728
|
+
delay += rand3(2500, 4e3);
|
|
1368
1729
|
const orderId = `ORD_${Date.now().toString(36).toUpperCase()}`;
|
|
1369
1730
|
const orderPrice = signal.direction === "LONG" ? price * (1 - rand3(1e-4, 5e-4)) : price * (1 + rand3(1e-4, 5e-4));
|
|
1370
1731
|
entries.push({
|
|
@@ -1389,7 +1750,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1389
1750
|
},
|
|
1390
1751
|
delay
|
|
1391
1752
|
});
|
|
1392
|
-
delay += rand3(
|
|
1753
|
+
delay += rand3(4e3, 7e3);
|
|
1393
1754
|
const fillPrice = orderPrice * (1 + rand3(-3e-4, 3e-4));
|
|
1394
1755
|
const slippage = Math.abs(fillPrice - orderPrice) / orderPrice * 100;
|
|
1395
1756
|
entries.push({
|
|
@@ -1438,7 +1799,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1438
1799
|
}
|
|
1439
1800
|
}
|
|
1440
1801
|
if (state.openPositions.length > 0 && Math.random() < 0.5) {
|
|
1441
|
-
delay += rand3(
|
|
1802
|
+
delay += rand3(3500, 5500);
|
|
1442
1803
|
let totalPositionPnl = 0;
|
|
1443
1804
|
const pnlParts = [];
|
|
1444
1805
|
for (const pos of state.openPositions) {
|
|
@@ -1474,7 +1835,7 @@ var init_BotSimulationEngine = __esm({
|
|
|
1474
1835
|
});
|
|
1475
1836
|
}
|
|
1476
1837
|
if (Math.random() < 0.2) {
|
|
1477
|
-
delay += rand3(
|
|
1838
|
+
delay += rand3(3e3, 5e3);
|
|
1478
1839
|
const exposure = state.openPositions.reduce((sum, p) => sum + p.size * p.leverage, 0);
|
|
1479
1840
|
const maxDrawdown = rand3(2, 12);
|
|
1480
1841
|
entries.push({
|