From 29ec4d4f2c75709b8ac613f55e89aed3da6b59c2 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 2 Oct 2023 10:30:15 +0200 Subject: [PATCH] added 3month, 6month, year in Trade Performance --- dabo/functions/webpage.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dabo/functions/webpage.sh b/dabo/functions/webpage.sh index a325c2a..2998c12 100644 --- a/dabo/functions/webpage.sh +++ b/dabo/functions/webpage.sh @@ -54,6 +54,21 @@ function webpage { $(find trade-histories -name "*-closed.history.csv.result" -mtime -30 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")% $(find trade-histories -name "*-closed.history.csv.result" -mtime -30 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM)}")% + + 3 Month (last 91 days): + $(find trade-histories -name "*-closed.history.csv.result" -mtime -91 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")% + $(find trade-histories -name "*-closed.history.csv.result" -mtime -91 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM)}")% + + + 6 Month (last 183 days): + $(find trade-histories -name "*-closed.history.csv.result" -mtime -183 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")% + $(find trade-histories -name "*-closed.history.csv.result" -mtime -183 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM)}")% + + + Year + $(find trade-histories -name "*-closed.history.csv.result" -mtime -365 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST})}")% + $(find trade-histories -name "*-closed.history.csv.result" -mtime -365 -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM)}")% + Performance complete): $(find trade-histories -name "*-closed.history.csv.result" -exec cat {} \; | awk "{ SUM += \$1} END { printf(\"%.2f\", SUM/100*${INVEST}) }")%