more pure bash to speed up things

This commit is contained in:
olli 2023-11-23 10:29:31 +01:00
parent e03394dc0d
commit 9a14cd27a3
2 changed files with 20 additions and 20 deletions

View File

@ -100,7 +100,7 @@ function analyze {
# check_sell_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile} # check_sell_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile}
# else # else
#echo "SELL Checks" #echo "SELL Checks"
time check_sell_conditions ${g_tmp}/${tmpfile} check_sell_conditions ${g_tmp}/${tmpfile}
# fi # fi
# fi # fi
# if ! [ -f "${g_tmp}/open-${tmpfile}" ] # if ! [ -f "${g_tmp}/open-${tmpfile}" ]
@ -110,27 +110,27 @@ function analyze {
# then # then
# check_buy_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile} # check_buy_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile}
# else # else
time check_buy_conditions ${g_tmp}/${tmpfile} check_buy_conditions ${g_tmp}/${tmpfile}
# 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} ] if [ -s ${g_tmp}/interim-${tmpfile} ]
# then then
# f_interim=$(tail -n1 ${g_tmp}/interim-${tmpfile}) f_interim=$(tail -n1 ${g_tmp}/interim-${tmpfile})
# f_interim=$(g_calc "${f_interim}-${FEE}") f_interim=$(g_calc "${f_interim}-${FEE}")
# fi fi
# fi fi
# echo "$f_line,${f_market_performance},${f_score},${f_buy_score},${f_sell_score},${f_intrade},${f_interim}" >>analyze-${analyzedate}/chart-${tmpfile} 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

View File

@ -122,7 +122,7 @@ function check_buy_conditions_strategy {
#if [ -s "${f_strategy}" ] #if [ -s "${f_strategy}" ]
#then #then
. "${f_strategy}" || return 1 time . "${f_strategy}" || return 1
#else #else
# g_echo_note "${f_echo_prefix}Strategy file not found" # g_echo_note "${f_echo_prefix}Strategy file not found"
# return 1 # return 1