diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 7f811a4..7233c65 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -71,15 +71,15 @@ function analyze { f_buy_score="" echo "$line" >>${g_tmp}/${tmpfile} + # get vars get_vars_from_csv ${g_tmp}/${tmpfile} - + + # get time from market_performance local f_time="${f_date%:*}" f_time="${f_time//[^0-9]/}" echo "$f_time" - #time=$(echo $line | cut -d, -f1 | cut -d: -f1,2) - #f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//') - #time=${time//[^0-9]/} + # get markel_performance from array with time 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} diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index f7bd61c..16414bd 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -17,7 +17,7 @@ function check_buy_conditions { fi # get asset vars - get_vars_from_csv "${f_ASSET_HIST_FILE}" || return 1 + [ -n "${BOT}" ] get_vars_from_csv "${f_ASSET_HIST_FILE}" || return 1 ### from here: check for defined state to buy f_BUY=""