analyue to analyze.sh

This commit is contained in:
olli 2023-11-29 09:26:59 +01:00
parent 7ed42713a7
commit 3ebf439333

View File

@ -111,7 +111,7 @@ function analyze {
# check_sell_conditions ${g_tmp}/${tmpfile} | #tee -a ${g_tmp}/output-${tmpfile}
# fi
# echo "INTERIM RESULT: ${f_real_result}%"
check_sell_conditions ${g_tmp}/${tmpfile} ${f_verbose}
eval check_sell_conditions ${g_tmp}/${tmpfile} ${f_verbose}
else
# if [ "${ANALYZE_VERBOSE}" -eq "0" ]
# then
@ -119,12 +119,12 @@ function analyze {
# else
# check_buy_conditions ${g_tmp}/${tmpfile} #| tee -a ${g_tmp}/output-${tmpfile}
# fi
check_buy_conditions ${g_tmp}/${tmpfile} ${f_verbose}
eval check_buy_conditions ${g_tmp}/${tmpfile} ${f_verbose}
fi
if [ -n "${f_BUY}" ]
then
echo "BUY: ${f_BUY}" ${f_verbose}
eval echo "BUY: ${f_BUY}" ${f_verbose}
f_open_trade=1
BUY_PRICE=$f_price
unset f_BUY
@ -132,15 +132,15 @@ function analyze {
if [ -n "${f_SELL}" ]
then
echo "SELL: ${f_date} ${f_SELL}" ${f_verbose}
eval echo "SELL: ${f_date} ${f_SELL}" ${f_verbose}
g_percentage-diff ${BUY_PRICE} ${f_price}
g_calc "${g_percentage_diff_result}-${FEE}"
result=${g_calc_result}
echo "${result}" >>${g_tmp}/result-${tmpfile}
eval echo "${result}" >>${g_tmp}/result-${tmpfile}
rm -f "${f_TRADE_HIST_FILE}"
rm -f "${f_TRADE_HIST_FILE_INTERIM}"
#echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})" >>${g_tmp}/output-${tmpfile}
echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})" ${f_verbose}
eval echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})" ${f_verbose}
unset f_open_trade
unset f_SELL
fi