fix empty vars

This commit is contained in:
olli 2023-11-27 23:04:55 +01:00
parent 83e3b16e04
commit f6994e484c

View File

@ -83,7 +83,10 @@ function analyze {
[ -z "${f_last_lines_array[3]}" ] && continue
echo "$line" >>${g_tmp}/${tmpfile}
# get vars
get_vars_from_csv ${g_tmp}/${tmpfile} || continue
# get time from market_performance
local f_time="${f_date%:*}"
f_time="${f_time//[^0-9]/}"
@ -92,12 +95,9 @@ function analyze {
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}
g_num_valid_number || unset f_market_performance
g_num_valid_number "${f_market_performance}" || f_market_performance=0
#echo "MARKET_PERF=$f_market_performance"
# get vars
get_vars_from_csv ${g_tmp}/${tmpfile} || continue
#if [ -f "${g_tmp}/open-${tmpfile}" ]
if [ -n "${f_open_trade}" ]
then