@gbozee/ultimate 0.0.2-121 → 0.0.2-123

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