This commit is contained in:
2023-11-06 18:26:41 +01:00
parent 723c95d8b1
commit d17a448e66
2 changed files with 2 additions and 38 deletions

View File

@@ -28,12 +28,10 @@ function get_vars_from_csv {
f_last_4_price=$(echo ${f_last_4_prices} | head -n1)
f_last_4_prices_change=$(g_percentage-diff ${f_last_4_price} ${f_price})
local f_orig_ifs=${IFS}
IFS=\n
if echo ${f_last_4_prices} | sort -n -C
if printf '%s\n' ${f_last_4_prices} | sort -n -C
then
f_price_trend="constantly growing,${f_last_4_prices_change}"
elif echo ${f_last_4_prices} | sort -n -r -C
elif printf '%s\n' ${f_last_4_prices} | sort -n -r -C
then
f_price_trend="constantly falling,${f_last_4_prices_change}"
elif g_num_is_higher ${f_last_4_prices_change} 0
@@ -47,7 +45,6 @@ function get_vars_from_csv {
fi
f_all_vars="$f_all_vars
f_price_trend=${f_price_trend}"
IFS=${f_orig_ifs}
# MACD EMA
get_var_from_line ema12 4