From f2ffb631858086de1675cd518595a38674e9b895 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 28 Oct 2023 15:16:21 +0200 Subject: [PATCH] added chart --- dabo/analyze.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 9c4b560..dd6b7c5 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -58,9 +58,6 @@ function analyze { time=$(echo $line | cut -d, -f1 | cut -d: -f1,2) f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//') echo "$line" >>${g_tmp}/${tmpfile} - # Chart Part - echo "$line,${f_market_performance},${f_score}" >>analyze-${analyzedate}/chart-${tmpfile} - # Chart Part End echo " ${line},${f_market_performance}" | perl -pe 's/([0-9].[0-9][0-9][0-9][0-9][0-9][0-9])[0-9]+/$1/g' | column -t -s, >>${g_tmp}/output-${tmpfile} if [ -f "${g_tmp}/open-${tmpfile}" ] then @@ -80,6 +77,9 @@ function analyze { check_buy_conditions ${g_tmp}/${tmpfile} fi fi + # Chart Part + echo "$line,${f_market_performance},${f_buy_score},${f_sell_score}" >>analyze-${analyzedate}/chart-${tmpfile} + # Chart Part End done # sell at the end to have a final result. @@ -173,8 +173,8 @@ do echo " - - + + analyze.sh ${ANALYZE_TIME} @@ -182,6 +182,8 @@ do " >analyze-${analyzedate}/chart-${tmpfile}.html echo "Price, EMA, Levels" >>analyze-${analyzedate}/chart-${tmpfile}.html genchart analyze-${analyzedate}/chart-${tmpfile} 500 2,25,26,27,28,29,30,31,32,33,34,35,4,36,37,38,39 green,DarkSlateGrey,DarkSlateGrey,Gold,DarkOrange,DarkOrange,GoldenRod,GoldenRod,GoldenRod,GoldenRod,DarkOrange,DarkOrange,MidnightBlue,Indigo,DarkSlateBlue,DodgerBlue,DeepSkyBlue >>analyze-${analyzedate}/chart-${tmpfile}.html + echo "Score" + genchart analyze-${analyzedate}/chart-${tmpfile} 500 41,42 red,yellow >>analyze-${analyzedate}/chart-${tmpfile}.html echo "MACD" >>analyze-${analyzedate}/chart-${tmpfile}.html genchart analyze-${analyzedate}/chart-${tmpfile} 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html