more pure bash to speed up things

This commit is contained in:
olli 2023-11-23 10:17:50 +01:00
parent 0da3b1f765
commit af539ddc21
3 changed files with 4 additions and 3 deletions

View File

@ -100,7 +100,7 @@ function analyze {
# check_sell_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile}
# else
#echo "SELL Checks"
time check_sell_conditions ${g_tmp}/${tmpfile}
check_sell_conditions ${g_tmp}/${tmpfile}
# fi
# fi
# if ! [ -f "${g_tmp}/open-${tmpfile}" ]
@ -110,7 +110,7 @@ function analyze {
# then
# check_buy_conditions ${g_tmp}/${tmpfile} >>${g_tmp}/output-${tmpfile}
# else
time check_buy_conditions ${g_tmp}/${tmpfile}
check_buy_conditions ${g_tmp}/${tmpfile}
# fi
fi
## Chart Part

View File

@ -19,7 +19,7 @@ function check_buy_conditions {
# get asset vars
if [ -n "${BOT}" ]
then
get_vars_from_csv "${f_ASSET_HIST_FILE}" || return 1
time get_vars_from_csv "${f_ASSET_HIST_FILE}" || return 1
fi
### from here: check for defined state to buy

View File

@ -16,6 +16,7 @@ function get_vars_from_csv {
# read last 4 lines in array if not given
if [ -z "${f_last_lines_array}" ]
then
echo "open file ${f_ASSET_HIST_FILE}"
mapfile -t f_last_lines_array < <(tail -n4 "${f_ASSET_HIST_FILE}")
fi