This commit is contained in:
olli 2023-05-16 11:57:11 +02:00
parent b9bce6ed7e
commit ee895e5168
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ function get_macd_indicator {
local f_lastline=$(tail -n1 "$f_hist_file" | grep ^2) local f_lastline=$(tail -n1 "$f_hist_file" | grep ^2)
# force min 15min 2 last lines # force min 15min 2 last lines
local f_second_lastline=$(tail -n2"$f_hist_file" | head -n1 | grep ^2) local f_second_lastline=$(tail -n2 "$f_hist_file" | head -n1 | grep ^2)
# Try to get current MACD values # Try to get current MACD values
local f_macd_lastprice=$(echo "$f_lastline" | cut -d, -f2) local f_macd_lastprice=$(echo "$f_lastline" | cut -d, -f2)

View File

@ -1,6 +1,6 @@
function get_vars_from_csv { function get_vars_from_csv {
local f_ASSET_HIST_FILE="$1" f_ASSET_HIST_FILE="$1"
if ! [ -s "${f_ASSET_HIST_FILE}" ] if ! [ -s "${f_ASSET_HIST_FILE}" ]
then then
g_echo_warn "${f_ASSET_HIST_FILE} does not exist or is empty" g_echo_warn "${f_ASSET_HIST_FILE} does not exist or is empty"
@ -39,7 +39,7 @@ function get_vars_from_csv {
function get_var_from_line { function get_var_from_line {
if [ -z "${f_last_line_array[$2]}" ] if [ -z "${f_last_line_array[$2]}" ]
then then
g_echo_note "Didn't get $1 in position $2" g_echo_note "${f_ASSET_HIST_FILE}: Didn't get $1 in position $2"
return 1 return 1
fi fi
declare -g f_$1="$(echo ${f_last_line_array[$2]})" declare -g f_$1="$(echo ${f_last_line_array[$2]})"