fix score

This commit is contained in:
2023-10-02 22:07:09 +02:00
parent e78f59b78a
commit a9cd258af8

View File

@@ -50,7 +50,7 @@ const { sortedArray, headerProps } = useSort<Result>(computed(() => props.items
.map(r => {
const quartils = getHistoryQuartils(r.history, days.value);
const profit = quartils.q1 === 0 || quartils.q3 === 0 ? 0 : marketTaxStore.calculateProfit(quartils.q1, quartils.q3);
const score = profit <= 0 ? 0 : Math.sqrt(quartils.totalVolume * r.sell * profit / Math.max(1, r.orderCount));
const score = profit <= 0 ? 0 : Math.sqrt(quartils.totalVolume * r.sell * profit / (days.value * Math.max(1, r.orderCount)));
return {
type: r.type,