fix empty vars
This commit is contained in:
parent
83e3b16e04
commit
f6994e484c
@ -84,6 +84,9 @@ function analyze {
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user