more pure bash to speed up things

This commit is contained in:
olli 2023-11-23 10:26:03 +01:00
parent ed03be671e
commit e03394dc0d

View File

@ -114,23 +114,23 @@ function analyze {
# fi
fi
## Chart Part
local f_intrade=0
local f_score=${f_buy_score}
local f_interim="0"
[ -z "${f_buy_score}" ] && f_buy_score=0
if [ -z "${f_sell_score}" ]
then
f_sell_score=0
else
f_score=${f_sell_score}
f_intrade=1
if [ -s ${g_tmp}/interim-${tmpfile} ]
then
f_interim=$(tail -n1 ${g_tmp}/interim-${tmpfile})
f_interim=$(g_calc "${f_interim}-${FEE}")
fi
fi
echo "$f_line,${f_market_performance},${f_score},${f_buy_score},${f_sell_score},${f_intrade},${f_interim}" >>analyze-${analyzedate}/chart-${tmpfile}
# local f_intrade=0
# local f_score=${f_buy_score}
# local f_interim="0"
# [ -z "${f_buy_score}" ] && f_buy_score=0
# if [ -z "${f_sell_score}" ]
# then
# f_sell_score=0
# else
# f_score=${f_sell_score}
# f_intrade=1
# if [ -s ${g_tmp}/interim-${tmpfile} ]
# then
# f_interim=$(tail -n1 ${g_tmp}/interim-${tmpfile})
# f_interim=$(g_calc "${f_interim}-${FEE}")
# fi
# fi
# 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
done