@gbozee/ultimate 0.0.2-119 → 0.0.2-121
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/frontend-index.js +7 -14
- package/dist/index.cjs +241 -214
- package/dist/index.d.ts +3 -0
- package/dist/index.js +245 -222
- package/dist/mcp-client.cjs +25 -50
- package/dist/mcp-client.js +25 -50
- package/dist/mcp-server.cjs +244 -220
- package/dist/mcp-server.js +248 -228
- package/package.json +1 -1
- package/dist/frontend/frontend-index.js +0 -1318
- package/dist/mcp.d.ts +0 -5
package/dist/frontend-index.js
CHANGED
|
@@ -152,8 +152,7 @@ class Signal {
|
|
|
152
152
|
support: kind === "long" ? _stop_loss : this.support
|
|
153
153
|
};
|
|
154
154
|
const instance = new Signal(derivedConfig);
|
|
155
|
-
if (kind === "short") {
|
|
156
|
-
}
|
|
155
|
+
if (kind === "short") {}
|
|
157
156
|
let result = instance.get_bulk_trade_zones({ current_price, kind });
|
|
158
157
|
return result;
|
|
159
158
|
return result?.filter((x) => {
|
|
@@ -371,8 +370,7 @@ class Signal {
|
|
|
371
370
|
kind = "long",
|
|
372
371
|
raw
|
|
373
372
|
}) {
|
|
374
|
-
if (raw) {
|
|
375
|
-
}
|
|
373
|
+
if (raw) {}
|
|
376
374
|
const margin_range = this.get_margin_range(current_price, kind);
|
|
377
375
|
let margin_zones = this.get_margin_zones({ current_price });
|
|
378
376
|
let remaining_zones = margin_zones.filter((x) => JSON.stringify(x) != JSON.stringify(margin_range));
|
|
@@ -583,8 +581,7 @@ class Signal {
|
|
|
583
581
|
return true;
|
|
584
582
|
});
|
|
585
583
|
let total_orders = limit_trades.concat(market_trades);
|
|
586
|
-
if (kind === "short") {
|
|
587
|
-
}
|
|
584
|
+
if (kind === "short") {}
|
|
588
585
|
if (this.minimum_size && total_orders.length > 0) {
|
|
589
586
|
let payload = total_orders;
|
|
590
587
|
let greater_than_min_size = total_orders.filter((o) => o ? o.quantity >= this.minimum_size : true);
|
|
@@ -670,8 +667,7 @@ class Signal {
|
|
|
670
667
|
});
|
|
671
668
|
const multiplier = start - index;
|
|
672
669
|
const incurred_fees = fees.reduce((a, b) => a + b, 0) + previous_risks.reduce((a, b) => a + b, 0);
|
|
673
|
-
if (index === 0) {
|
|
674
|
-
}
|
|
670
|
+
if (index === 0) {}
|
|
675
671
|
let quantity = determine_position_size({
|
|
676
672
|
entry,
|
|
677
673
|
stop,
|
|
@@ -837,8 +833,7 @@ function extractValue(_param, condition) {
|
|
|
837
833
|
try {
|
|
838
834
|
let value2 = JSON.parse(_param || "[]");
|
|
839
835
|
param = value2.map((o) => parseFloat(o));
|
|
840
|
-
} catch (error) {
|
|
841
|
-
}
|
|
836
|
+
} catch (error) {}
|
|
842
837
|
} else {
|
|
843
838
|
param = parseFloat(_param);
|
|
844
839
|
}
|
|
@@ -853,8 +848,7 @@ function asCoins(symbol) {
|
|
|
853
848
|
if (symbol.toLowerCase().includes("-")) {
|
|
854
849
|
result = result.split("-")[0];
|
|
855
850
|
}
|
|
856
|
-
if (symbol.toLowerCase() == "usdt-usd") {
|
|
857
|
-
}
|
|
851
|
+
if (symbol.toLowerCase() == "usdt-usd") {}
|
|
858
852
|
let result2 = _type == "usdt" ? symbol.split(result)[0] : result;
|
|
859
853
|
if (result.includes("-")) {
|
|
860
854
|
result2 = result;
|
|
@@ -1243,8 +1237,7 @@ function buildConfig(app_config, {
|
|
|
1243
1237
|
return [];
|
|
1244
1238
|
}
|
|
1245
1239
|
const condition = (kind === "long" ? entry > app_config.support : entry >= app_config.support) && stop >= app_config.support * 0.999;
|
|
1246
|
-
if (kind === "short") {
|
|
1247
|
-
}
|
|
1240
|
+
if (kind === "short") {}
|
|
1248
1241
|
const result = entry === stop ? [] : condition ? instance.build_entry({
|
|
1249
1242
|
current_price: entry,
|
|
1250
1243
|
stop_loss: stop,
|