better "Trade Performance" overview

This commit is contained in:
olli 2023-06-22 11:42:50 +02:00
parent e7eb8e3326
commit f1aa8898fe

View File

@ -36,16 +36,23 @@ 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/100*${INVEST})}")%</td>
</td>
<td><b>Performance</b></td>
<td><b>Average</b></td>
<td><b>Added</b></td>
<tr>
<td>Performance week (last 7 days):</td>
<tr>
<td>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/100*${INVEST})}")%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -1 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100)}")%</td>
<tr>
<td>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/100*${INVEST})}")%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -7 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100)}")%</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/100*${INVEST})}")%</td>
<td>Month (last 30 days):</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -30 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")%</td>
<td> $(find trade-histories -name "*-closed.history.csv.result" -mtime -30 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100)}")%</td>
</tr>
<tr>
<td>Performance complete):</td>