This commit is contained in:
olli 2023-05-19 08:23:14 +02:00
parent 98f3373325
commit 95d9ce2a6c
2 changed files with 15 additions and 7 deletions

View File

@ -59,7 +59,7 @@ function analyze {
do
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
then
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} 2>&1
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} #2>&1
else
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
fi
@ -68,16 +68,11 @@ function analyze {
if ! [ -f "${g_tmp}/open-${tmpfile}" ]
then
f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//')
if [ -z "${f_market_performance}" ]
then
g_echo_note "No market performanvce data found - forcing good market (100)"
f_market_performance=100
fi
for f_strategy in $(find strategies -name "buy.*.conf" -type f)
do
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
then
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} 2>&1 || break
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} #2>&1 || break
else
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
fi

View File

@ -35,6 +35,19 @@ function get_vars_from_csv {
get_var_from_line price_change_14_day 20
get_var_from_line price_change_30_day 21
if [ -z "${f_market_performance}" ]
then
if [ -z "${BOT}" ]
then
g_echo_note "Analyze: No market performanvce data found - forcing good market (100)"
f_market_performance=100
else
g_echo_note "Bot: No market performanvce data found - forcing bad market (-100)"
f_market_performance=-100
fi
fi
}
function get_var_from_line {