From fdadf53051adab8d8040d267e82bb726f6809787 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 15 May 2023 11:51:54 +0200 Subject: [PATCH] better analyze.sh stats --- dabo/analyze.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index eb40b2f..dc5e47e 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -156,11 +156,20 @@ fi echo "OVERALL RESULT: $(cat ${g_tmp}/overall-result-* | awk '{ SUM += $1 } END { printf("%2.2f", SUM) }')%" | tee analyze-${analyzedate}/overall-result.log cat analyze-${analyzedate}/*.history.csv.log >analyze-${analyzedate}/analyze-overall.log +echo "" | tee -a analyze-${analyzedate}/overall-result.log +echo "Trades: $(grep "BUY: "analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "Trade results positive: $(grep "^RESULT: " analyze-${analyzedate}/analyze-overall.log | grep ": [0-9]" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "Trade results negative: $(grep "^RESULT: " analyze-${analyzedate}/analyze-overall.log | grep ": -" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "Trade results neutral: $(grep "^RESULT: " analyze-${analyzedate}/analyze-overall.log | grep ": 0.00" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "" | tee -a analyze-${analyzedate}/overall-result.log +echo "Interim results: $(grep "INTERIM RESULT: " analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "Interim results positive: $(grep "INTERIM RESULT: [0-9]" analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "Interim results negative: $(grep "INTERIM RESULT: -" analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "" | tee -a analyze-${analyzedate}/overall-result.log +echo "First interim result after BUY positive: $(grep "BUY: " -A6 analyze-${analyzedate}/analyze-overall.log | grep "INTERIM RESULT: [0-9]" | grep -v "0.00" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "First interim result after BUY negative: $(grep "BUY: " -A6 analyze-${analyzedate}/analyze-overall.log | grep "INTERIM RESULT: -" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log +echo "First interim result after BUY neutral 0.00: $(grep "BUY: " -A6 analyze-${analyzedate}/analyze-overall.log | grep "INTERIM RESULT: -" | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log -echo Trades: "$(grep "BUY: " analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log -echo Interim Results: "$(grep "INTERIM RESULT: " analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log -echo Interim Results Positive: "$(grep "INTERIM RESULT: [0-9]" analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log -echo Interim Results Negative: "$(grep "INTERIM RESULT: -" analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log echo " Complete Results" >>analyze-${analyzedate}/overall-result.log