better analyze.sh output

This commit is contained in:
olli 2023-05-22 12:12:30 +02:00
parent 96f7e0c20e
commit b2e6499dc9

View File

@ -7,7 +7,20 @@ function get_vars_from_csv {
return 1
fi
f_last_line="$(tail -n1 "${f_ASSET_HIST_FILE}")"
if [ -z "${f_market_performance}" ]
then
if [ -z "${BOT}" ]
then
g_echo_note "Analyze: No market performanvce data found - forcing good market (100)"
f_market_performance=-100
else
g_echo_note "Bot: No market performanvce data found - forcing bad market (-100)"
f_market_performance=-100
fi
fi
f_last_line="$(tail -n1 "${f_ASSET_HIST_FILE}"),${f_market_performance}"
readarray -d "," -t f_last_line_array < <(echo "0,${f_last_line}")
@ -35,19 +48,6 @@ function get_vars_from_csv {
get_var_from_line price_change_14_day 20
get_var_from_line price_change_30_day 21
if [ -z "${f_market_performance}" ]
then
if [ -z "${BOT}" ]
then
g_echo_note "Analyze: No market performanvce data found - forcing good market (100)"
f_market_performance=100
else
g_echo_note "Bot: No market performanvce data found - forcing bad market (-100)"
f_market_performance=-100
fi
fi
}
function get_var_from_line {