more pure bash to speed up things
This commit is contained in:
parent
2bddc69247
commit
bf80a74c70
@ -71,15 +71,15 @@ function analyze {
|
|||||||
f_buy_score=""
|
f_buy_score=""
|
||||||
|
|
||||||
echo "$line" >>${g_tmp}/${tmpfile}
|
echo "$line" >>${g_tmp}/${tmpfile}
|
||||||
|
# get vars
|
||||||
get_vars_from_csv ${g_tmp}/${tmpfile}
|
get_vars_from_csv ${g_tmp}/${tmpfile}
|
||||||
|
|
||||||
|
# get time from market_performance
|
||||||
local f_time="${f_date%:*}"
|
local f_time="${f_date%:*}"
|
||||||
f_time="${f_time//[^0-9]/}"
|
f_time="${f_time//[^0-9]/}"
|
||||||
echo "$f_time"
|
echo "$f_time"
|
||||||
|
|
||||||
#time=$(echo $line | cut -d, -f1 | cut -d: -f1,2)
|
# get markel_performance from array with time
|
||||||
#f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//')
|
|
||||||
#time=${time//[^0-9]/}
|
|
||||||
f_market_performance=${f_market_performace_array[${f_time}]}
|
f_market_performance=${f_market_performace_array[${f_time}]}
|
||||||
[ -z "${f_market_performance}" ] && f_market_performance=${f_market_performance_before}
|
[ -z "${f_market_performance}" ] && f_market_performance=${f_market_performance_before}
|
||||||
f_market_performance_before=${f_market_performance}
|
f_market_performance_before=${f_market_performance}
|
||||||
|
@ -17,7 +17,7 @@ function check_buy_conditions {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get asset vars
|
# 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
|
### from here: check for defined state to buy
|
||||||
f_BUY=""
|
f_BUY=""
|
||||||
|
Loading…
Reference in New Issue
Block a user