@gbozee/ultimate 0.0.2-next.49 → 0.0.2-next.50

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.
@@ -1158,6 +1158,7 @@ export declare function computeMarginProtection({ entry, quantity, tp, stop_loss
1158
1158
  tp: number;
1159
1159
  risk: number;
1160
1160
  protect_quantity: number;
1161
+ ideal_protect_quantity: number;
1161
1162
  hedge: number;
1162
1163
  price_place: string;
1163
1164
  decimal_place: string;
@@ -2985,6 +2985,7 @@ function computeMarginProtection({
2985
2985
  const loss = Math.abs(avg_price - stop_loss.price) * avg_qty;
2986
2986
  const margin_position = pnl / Math.abs(next_order - tp.price);
2987
2987
  const protect_position = loss / Math.abs(stop_loss.price - tp.price);
2988
+ const ideal_protect_position = loss / Math.abs(next_order - tp.price);
2988
2989
  const places = {
2989
2990
  BTCUSDT: "%.5f",
2990
2991
  ETHUSDT: "%.4f",
@@ -3011,6 +3012,7 @@ function computeMarginProtection({
3011
3012
  tp: next_order,
3012
3013
  risk: to_f(pnl, "%.1f"),
3013
3014
  protect_quantity: to_f(protect_position, places[symbol]),
3015
+ ideal_protect_quantity: to_f(ideal_protect_position, places[symbol]),
3014
3016
  hedge: to_f(loss, "%.1f"),
3015
3017
  price_place: price_places[symbol],
3016
3018
  decimal_place: places[symbol]
package/dist/index.cjs CHANGED
@@ -63428,6 +63428,7 @@ function computeMarginProtection({
63428
63428
  const loss = Math.abs(avg_price - stop_loss.price) * avg_qty;
63429
63429
  const margin_position = pnl / Math.abs(next_order - tp.price);
63430
63430
  const protect_position = loss / Math.abs(stop_loss.price - tp.price);
63431
+ const ideal_protect_position = loss / Math.abs(next_order - tp.price);
63431
63432
  const places = {
63432
63433
  BTCUSDT: "%.5f",
63433
63434
  ETHUSDT: "%.4f",
@@ -63454,6 +63455,7 @@ function computeMarginProtection({
63454
63455
  tp: next_order,
63455
63456
  risk: to_f(pnl, "%.1f"),
63456
63457
  protect_quantity: to_f(protect_position, places[symbol]),
63458
+ ideal_protect_quantity: to_f(ideal_protect_position, places[symbol]),
63457
63459
  hedge: to_f(loss, "%.1f"),
63458
63460
  price_place: price_places[symbol],
63459
63461
  decimal_place: places[symbol]
package/dist/index.d.ts CHANGED
@@ -6165,6 +6165,7 @@ export declare function computeMarginProtection({ entry, quantity, tp, stop_loss
6165
6165
  tp: number;
6166
6166
  risk: number;
6167
6167
  protect_quantity: number;
6168
+ ideal_protect_quantity: number;
6168
6169
  hedge: number;
6169
6170
  price_place: string;
6170
6171
  decimal_place: string;
package/dist/index.js CHANGED
@@ -63340,6 +63340,7 @@ function computeMarginProtection({
63340
63340
  const loss = Math.abs(avg_price - stop_loss.price) * avg_qty;
63341
63341
  const margin_position = pnl / Math.abs(next_order - tp.price);
63342
63342
  const protect_position = loss / Math.abs(stop_loss.price - tp.price);
63343
+ const ideal_protect_position = loss / Math.abs(next_order - tp.price);
63343
63344
  const places = {
63344
63345
  BTCUSDT: "%.5f",
63345
63346
  ETHUSDT: "%.4f",
@@ -63366,6 +63367,7 @@ function computeMarginProtection({
63366
63367
  tp: next_order,
63367
63368
  risk: to_f(pnl, "%.1f"),
63368
63369
  protect_quantity: to_f(protect_position, places[symbol]),
63370
+ ideal_protect_quantity: to_f(ideal_protect_position, places[symbol]),
63369
63371
  hedge: to_f(loss, "%.1f"),
63370
63372
  price_place: price_places[symbol],
63371
63373
  decimal_place: places[symbol]
@@ -67150,6 +67150,7 @@ function computeMarginProtection({
67150
67150
  const loss = Math.abs(avg_price - stop_loss.price) * avg_qty;
67151
67151
  const margin_position = pnl / Math.abs(next_order - tp.price);
67152
67152
  const protect_position = loss / Math.abs(stop_loss.price - tp.price);
67153
+ const ideal_protect_position = loss / Math.abs(next_order - tp.price);
67153
67154
  const places = {
67154
67155
  BTCUSDT: "%.5f",
67155
67156
  ETHUSDT: "%.4f",
@@ -67176,6 +67177,7 @@ function computeMarginProtection({
67176
67177
  tp: next_order,
67177
67178
  risk: to_f(pnl, "%.1f"),
67178
67179
  protect_quantity: to_f(protect_position, places[symbol]),
67180
+ ideal_protect_quantity: to_f(ideal_protect_position, places[symbol]),
67179
67181
  hedge: to_f(loss, "%.1f"),
67180
67182
  price_place: price_places[symbol],
67181
67183
  decimal_place: places[symbol]
@@ -67123,6 +67123,7 @@ function computeMarginProtection({
67123
67123
  const loss = Math.abs(avg_price - stop_loss.price) * avg_qty;
67124
67124
  const margin_position = pnl / Math.abs(next_order - tp.price);
67125
67125
  const protect_position = loss / Math.abs(stop_loss.price - tp.price);
67126
+ const ideal_protect_position = loss / Math.abs(next_order - tp.price);
67126
67127
  const places = {
67127
67128
  BTCUSDT: "%.5f",
67128
67129
  ETHUSDT: "%.4f",
@@ -67149,6 +67150,7 @@ function computeMarginProtection({
67149
67150
  tp: next_order,
67150
67151
  risk: to_f(pnl, "%.1f"),
67151
67152
  protect_quantity: to_f(protect_position, places[symbol]),
67153
+ ideal_protect_quantity: to_f(ideal_protect_position, places[symbol]),
67152
67154
  hedge: to_f(loss, "%.1f"),
67153
67155
  price_place: price_places[symbol],
67154
67156
  decimal_place: places[symbol]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbozee/ultimate",
3
3
  "type": "module",
4
- "version": "0.0.2-next.49",
4
+ "version": "0.0.2-next.50",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",