scope360-core 0.0.516 → 0.0.517

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.
@@ -29904,7 +29904,7 @@ function O_(t) {
29904
29904
  return t;
29905
29905
  }
29906
29906
  function G4(t, e) {
29907
- const n = parseFloat(t.entry_price), s = t.amount, i = t.pair.toLowerCase(), a = t.side, r = t.leverage, l = ((d) => d.endsWith("jpy") ? 1e3 : d.startsWith("xau") || d.endsWith("f.t") || d.endsWith(".b") || d.endsWith("sek") || d.endsWith("mxn") || d.endsWith("xpd") || d.endsWith("xag") || d.endsWith("xbr") || d.endsWith("xng") || d.endsWith("xpt") || d.endsWith("xti") ? 100 : d === "cocoa" || d === "coffee" ? 1 : d === "brent" ? 100 : 1e5)(i);
29907
+ const n = parseFloat(t.entry_price), s = t.amount, i = t.pair.toLowerCase(), a = t.side, r = t.leverage, l = ((d) => d.endsWith("sek") || d.endsWith("mxn") || d.endsWith("jpy") ? 1e3 : d.startsWith("xau") || d.endsWith("f.t") || d.endsWith(".b") || d.endsWith("xpd") || d.endsWith("xag") || d.endsWith("xbr") || d.endsWith("xng") || d.endsWith("xpt") || d.endsWith("xti") ? 100 : d === "cocoa" || d === "coffee" ? 1 : d === "brent" ? 100 : 1e5)(i);
29908
29908
  let u = 0, c = 0;
29909
29909
  return a === "LONG" ? (u = (e.bid - n) * s * l, c = u / (s * n * l / r)) : a === "SHORT" && (u = (n - e.ask) * s * l, c = u / (s * n * l / r)), { pnl: u, pnl_roi: c };
29910
29910
  }