more pure bash to speed up things

This commit is contained in:
olli 2023-11-12 17:55:30 +01:00
parent 2bddc69247
commit bf80a74c70
2 changed files with 5 additions and 5 deletions

View File

@ -71,15 +71,15 @@ function analyze {
f_buy_score=""
echo "$line" >>${g_tmp}/${tmpfile}
# get vars
get_vars_from_csv ${g_tmp}/${tmpfile}
# get time from market_performance
local f_time="${f_date%:*}"
f_time="${f_time//[^0-9]/}"
echo "$f_time"
#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/ *//')
#time=${time//[^0-9]/}
# get markel_performance from array with time
f_market_performance=${f_market_performace_array[${f_time}]}
[ -z "${f_market_performance}" ] && f_market_performance=${f_market_performance_before}
f_market_performance_before=${f_market_performance}

View File

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