@gbozee/ultimate 0.0.2-70 → 0.0.2-71
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 +3 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/frontend-index.js
CHANGED
|
@@ -2074,8 +2074,10 @@ class Strategy {
|
|
|
2074
2074
|
quantity: this.position[app_config.kind].quantity
|
|
2075
2075
|
}
|
|
2076
2076
|
]), app_config.decimal_places, app_config.price_places);
|
|
2077
|
-
const expected_loss = Math.abs(avg.price - stop) * avg.quantity;
|
|
2077
|
+
const expected_loss = to_f(Math.abs(avg.price - stop) * avg.quantity, "%.2f");
|
|
2078
2078
|
const profit_percent = to_f(this.pnl(kind) * 100 / (avg.price * avg.quantity), "%.3f");
|
|
2079
|
+
app_config.entry = this.to_f(app_config.entry);
|
|
2080
|
+
app_config.stop = this.to_f(app_config.stop);
|
|
2079
2081
|
return { ...app_config, avg, loss: -expected_loss, profit_percent };
|
|
2080
2082
|
}
|
|
2081
2083
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -53981,8 +53981,10 @@ class Strategy {
|
|
|
53981
53981
|
quantity: this.position[app_config.kind].quantity
|
|
53982
53982
|
}
|
|
53983
53983
|
]), app_config.decimal_places, app_config.price_places);
|
|
53984
|
-
const expected_loss = Math.abs(avg.price - stop) * avg.quantity;
|
|
53984
|
+
const expected_loss = to_f2(Math.abs(avg.price - stop) * avg.quantity, "%.2f");
|
|
53985
53985
|
const profit_percent = to_f2(this.pnl(kind) * 100 / (avg.price * avg.quantity), "%.3f");
|
|
53986
|
+
app_config.entry = this.to_f(app_config.entry);
|
|
53987
|
+
app_config.stop = this.to_f(app_config.stop);
|
|
53986
53988
|
return { ...app_config, avg, loss: -expected_loss, profit_percent };
|
|
53987
53989
|
}
|
|
53988
53990
|
}
|
package/dist/index.js
CHANGED
|
@@ -53936,8 +53936,10 @@ class Strategy {
|
|
|
53936
53936
|
quantity: this.position[app_config.kind].quantity
|
|
53937
53937
|
}
|
|
53938
53938
|
]), app_config.decimal_places, app_config.price_places);
|
|
53939
|
-
const expected_loss = Math.abs(avg.price - stop) * avg.quantity;
|
|
53939
|
+
const expected_loss = to_f2(Math.abs(avg.price - stop) * avg.quantity, "%.2f");
|
|
53940
53940
|
const profit_percent = to_f2(this.pnl(kind) * 100 / (avg.price * avg.quantity), "%.3f");
|
|
53941
|
+
app_config.entry = this.to_f(app_config.entry);
|
|
53942
|
+
app_config.stop = this.to_f(app_config.stop);
|
|
53941
53943
|
return { ...app_config, avg, loss: -expected_loss, profit_percent };
|
|
53942
53944
|
}
|
|
53943
53945
|
}
|