better "Trade Performance" overview - cleaned by $INVEST Quantitiy

This commit is contained in:
olli 2023-06-19 18:04:59 +02:00
parent cce49bec63
commit e7eb8e3326

View File

@ -37,19 +37,19 @@ function webpage {
echo "<table>
<tr>
<td>Performance day (last 24 hours):</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -1 -exec cat {} \; | awk '{ SUM += $1} END { printf("%.2f", SUM) }')%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -1 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")%</td>
</td>
<tr>
<td>Performance week (last 7 days):</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -7 -exec cat {} \; | awk '{ SUM += $1} END { printf("%.2f", SUM) }')%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -7 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")%</td>
</tr>
<tr>
<td>Performance month (last 30 days):</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -31 -exec cat {} \; | awk '{ SUM += $1} END { printf("%.2f", SUM) }')%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -31 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")%</td>
</tr>
<tr>
<td>Performance complete):</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -exec cat {} \; | awk '{ SUM += $1} END { printf("%.2f", SUM) }')%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST}) }")%</td>
</tr>
</table>" >>../index.html.tmp