analyze 2 analyze

This commit is contained in:
olli 2023-11-28 17:04:01 +01:00
parent fd11f90cd9
commit 8b5ffad49c
2 changed files with 27 additions and 25 deletions

View File

@ -119,18 +119,20 @@ function analyze {
fi fi
fi fi
#if [ -n "${f_SELL}" ] if [ -n "${f_SELL}" ]
#then then
# echo "SELL: ${f_date} ${f_SELL}" set -x
# g_percentage-diff ${BUY_PRICE} ${f_price} echo "SELL: ${f_date} ${f_SELL}"
# g_calc "${g_percentage_diff_result}-${FEE}" g_percentage-diff ${BUY_PRICE} ${f_price}
# result=${g_calc_result} g_calc "${g_percentage_diff_result}-${FEE}"
# echo "${result}" >>${g_tmp}/result-${tmpfile} result=${g_calc_result}
# rm -f "${f_TRADE_HIST_FILE}" echo "${result}" >>${g_tmp}/result-${tmpfile}
# rm -f "${f_TRADE_HIST_FILE_INTERIM}" rm -f "${f_TRADE_HIST_FILE}"
# unset f_open_trade rm -f "${f_TRADE_HIST_FILE_INTERIM}"
# echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})" unset f_open_trade
#fi echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
set +x
fi
## Chart Part ## Chart Part

View File

@ -99,19 +99,19 @@ function check_sell_conditions {
fi fi
fi fi
# ANALYZE # # ANALYZE
if [ -n "${f_SELL}" ] && [ -z "${BOT}" ] # if [ -n "${f_SELL}" ] && [ -z "${BOT}" ]
then # then
echo "SELL: ${f_date} ${f_SELL}" # echo "SELL: ${f_date} ${f_SELL}"
g_percentage-diff ${BUY_PRICE} ${f_price} # g_percentage-diff ${BUY_PRICE} ${f_price}
g_calc "${g_percentage_diff_result}-${FEE}" # g_calc "${g_percentage_diff_result}-${FEE}"
result=${g_calc_result} # result=${g_calc_result}
echo "${result}" >>${g_tmp}/result-${tmpfile} # echo "${result}" >>${g_tmp}/result-${tmpfile}
rm -f "${f_TRADE_HIST_FILE}" # rm -f "${f_TRADE_HIST_FILE}"
rm -f "${f_TRADE_HIST_FILE_INTERIM}" # rm -f "${f_TRADE_HIST_FILE_INTERIM}"
unset f_open_trade # unset f_open_trade
echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})" # echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
fi # fi
} }