more pure bash to speed up things

This commit is contained in:
olli 2023-11-12 12:41:31 +01:00
parent 4ab6df1652
commit 3c559e65c6

View File

@ -1,6 +1,5 @@
function get_vars_from_csv {
f_ASSET_HIST_FILE="$1"
if ! [ -s "${f_ASSET_HIST_FILE}" ]
then
@ -86,9 +85,11 @@ f_price_trend=${f_price_trend}"
# MACD
get_var_from_line macd_histogram 8
get_var_from_line macd_signal_relation 9
f_macd_histogram_relation=$(echo "${f_macd_signal_relation}" | cut -d\| -f1)
#f_macd_histogram_relation=$(echo "${f_macd_signal_relation}" | cut -d\| -f1)
f_macd_histogram_relation="${f_macd_signal_relation%|*}"
[ -z "$f_macd_histogram_relation" ] && return 1
f_macd_histogram_signal=$(echo "${f_macd_signal_relation}" | cut -d\| -f2)
#f_macd_histogram_signal=$(echo "${f_macd_signal_relation}" | cut -d\| -f2)
f_macd_histogram_relation="${f_macd_signal_relation#|*}"
f_all_vars="${f_all_vars}
f_macd_histogram_relation=${f_macd_histogram_relation}
f_macd_histogram_signal=${f_macd_histogram_signal}"