disabled chart

This commit is contained in:
olli 2023-11-27 11:52:50 +01:00
parent cc5cddd4f0
commit d87fdf9cbe

View File

@ -6,9 +6,9 @@ rm -r /tmp/parallel-* /tmp/overall-result-* /tmp/g_analyze.sh-*
. /etc/bash/gaboshlib.include . /etc/bash/gaboshlib.include
# Chart Part ## Chart Part
. dabo/functions/genchart.sh #. dabo/functions/genchart.sh
# Chart Part End ## Chart Part End
g_nice g_nice
@ -54,7 +54,7 @@ function analyze {
rm -rf ${g_tmp}/output-${tmpfile} rm -rf ${g_tmp}/output-${tmpfile}
# Chart Part # Chart Part
echo "$(head -n1 ${file}),Market Perrormance,Score,Buy Score,Sell Score,InTrade,Inetrim Result" >analyze-${analyzedate}/chart-${tmpfile} #echo "$(head -n1 ${file}),Market Perrormance,Score,Buy Score,Sell Score,InTrade,Inetrim Result" >analyze-${analyzedate}/chart-${tmpfile}
# Chart Part End # Chart Part End
# create market performance array of timeframe # create market performance array of timeframe
@ -114,30 +114,26 @@ function analyze {
fi fi
fi fi
## Chart Part ## Chart Part
local f_intrade=0 #local f_intrade=0
local f_score=${f_buy_score} #local f_score=${f_buy_score}
local f_interim="0" #local f_interim="0"
[ -z "${f_buy_score}" ] && f_buy_score=0 #[ -z "${f_buy_score}" ] && f_buy_score=0
if [ -z "${f_sell_score}" ] #if [ -z "${f_sell_score}" ]
then #then
f_sell_score=0 # f_sell_score=0
else #else
f_score=${f_sell_score} # f_score=${f_sell_score}
f_intrade=1 # f_intrade=1
#if [ -s ${g_tmp}/interim-${tmpfile} ] # f_interim=${f_real_result}
#then #fi
#f_interim=$(tail -n1 ${g_tmp}/interim-${tmpfile}) #f_chart_array+=("$f_line,${f_market_performance},${f_score},${f_buy_score},${f_sell_score},${f_intrade},${f_interim}")
#g_calc "${f_interim}-${FEE}"
#f_interim=${g_calc_result}
f_interim=${f_real_result}
#fi
fi
f_chart_array+=("$f_line,${f_market_performance},${f_score},${f_buy_score},${f_sell_score},${f_intrade},${f_interim}")
#echo "$f_line,${f_market_performance},${f_score},${f_buy_score},${f_sell_score},${f_intrade},${f_interim}" >>analyze-${analyzedate}/chart-${tmpfile}
## Chart Part End ## Chart Part End
done done
## Chart Part
#printf '%s\n' "${f_chart_array[@]}" >>analyze-${analyzedate}/chart-${tmpfile} #printf '%s\n' "${f_chart_array[@]}" >>analyze-${analyzedate}/chart-${tmpfile}
#cat analyze-${analyzedate}/chart-${tmpfile} #cat analyze-${analyzedate}/chart-${tmpfile}
## Chart Part End
# sell at the end to have a final result. # sell at the end to have a final result.
#if [ -f ${g_tmp}/open-${tmpfile} ] #if [ -f ${g_tmp}/open-${tmpfile} ]
@ -173,33 +169,33 @@ function analyze {
cat ${g_tmp}/output-${tmpfile} >"analyze-${analyzedate}/${tmpfile}.log" cat ${g_tmp}/output-${tmpfile} >"analyze-${analyzedate}/${tmpfile}.log"
# Chart Part ## Chart Part
if [ -s "analyze-${analyzedate}/chart-${tmpfile}" ] # if [ -s "analyze-${analyzedate}/chart-${tmpfile}" ]
then # then
#g_echo "generating chart for $file from analyze-${analyzedate}/chart-${tmpfile}" # #g_echo "generating chart for $file from analyze-${analyzedate}/chart-${tmpfile}"
echo "<html><head> # echo "<html><head>
<meta charset='UTF-8'> #<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'> #<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' href='../data/browser.css'> #<link rel='stylesheet' type='text/css' href='../data/browser.css'>
<link rel='stylesheet' type='text/css' href='../data/charts.min.css'> #<link rel='stylesheet' type='text/css' href='../data/charts.min.css'>
<title>analyze.sh ${ANALYZE_TIME}</title> #<title>analyze.sh ${ANALYZE_TIME}</title>
</head> #</head>
<body> #<body>
<h1>analyze.sh ${ANALYZE_TIME}</h1> #<h1>analyze.sh ${ANALYZE_TIME}</h1>
" >analyze-${analyzedate}/chart-${tmpfile}.html #" >analyze-${analyzedate}/chart-${tmpfile}.html
echo "Price, EMA, Levels" >>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 # 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" >>analyze-${analyzedate}/chart-${tmpfile}.html # echo "Score" >>analyze-${analyzedate}/chart-${tmpfile}.html
genchart analyze-${analyzedate}/chart-${tmpfile} 500 42,46,45,41 Green,Red,Orange >>analyze-${analyzedate}/chart-${tmpfile}.html # genchart analyze-${analyzedate}/chart-${tmpfile} 500 42,46,45,41 Green,Red,Orange >>analyze-${analyzedate}/chart-${tmpfile}.html
#echo "Sell Score" >>analyze-${analyzedate}/chart-${tmpfile}.html # #echo "Sell Score" >>analyze-${analyzedate}/chart-${tmpfile}.html
#genchart analyze-${analyzedate}/chart-${tmpfile} 500 42 green,blue >>analyze-${analyzedate}/chart-${tmpfile}.html # #genchart analyze-${analyzedate}/chart-${tmpfile} 500 42 green,blue >>analyze-${analyzedate}/chart-${tmpfile}.html
echo "MACD" >>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 # genchart analyze-${analyzedate}/chart-${tmpfile} 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html
echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html # echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html
genchart analyze-${analyzedate}/chart-${tmpfile} 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html # genchart analyze-${analyzedate}/chart-${tmpfile} 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html
echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html # echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html
fi # fi
# Chart Part END ## Chart Part END
} }
for conf in dabo-bot.conf analyze.conf for conf in dabo-bot.conf analyze.conf
@ -221,9 +217,9 @@ cp -r strategies analyze-${analyzedate}/
analyzecounter=0 analyzecounter=0
# Chart Part ## Chart Part
[ -e data/charts.min.css ] || wget -q https://raw.githubusercontent.com/ChartsCSS/charts.css/main/dist/charts.min.css -O data/charts.min.css #[ -e data/charts.min.css ] || wget -q https://raw.githubusercontent.com/ChartsCSS/charts.css/main/dist/charts.min.css -O data/charts.min.css
# Chart Part End ## Chart Part End
for file in $@ for file in $@
do do