analyze 2 analyze

This commit is contained in:
olli 2023-11-28 17:25:37 +01:00
parent 9c954c88f0
commit e44461d321

View File

@ -101,7 +101,6 @@ function analyze {
g_num_valid_number "${f_market_performance}" >/dev/null 2>&1 || f_market_performance=0
echo "=== OPEN TRADE: ${f_open_trade}"
if [ -n "${f_open_trade}" ]
then
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
@ -118,7 +117,6 @@ function analyze {
check_buy_conditions ${g_tmp}/${tmpfile} #| tee -a ${g_tmp}/output-${tmpfile}
fi
fi
echo "=== END "
if [ -n "${f_BUY}" ]
then
@ -128,18 +126,18 @@ function analyze {
unset f_BUY
fi
# if [ -n "${f_SELL}" ]
# then
# echo "SELL: ${f_date} ${f_SELL}"
# g_percentage-diff ${BUY_PRICE} ${f_price}
# g_calc "${g_percentage_diff_result}-${FEE}"
# result=${g_calc_result}
# echo "${result}" >>${g_tmp}/result-${tmpfile}
# rm -f "${f_TRADE_HIST_FILE}"
# rm -f "${f_TRADE_HIST_FILE_INTERIM}"
# unset f_open_trade
# echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
# fi
if [ -n "${f_SELL}" ]
then
echo "SELL: ${f_date} ${f_SELL}"
g_percentage-diff ${BUY_PRICE} ${f_price}
g_calc "${g_percentage_diff_result}-${FEE}"
result=${g_calc_result}
echo "${result}" >>${g_tmp}/result-${tmpfile}
rm -f "${f_TRADE_HIST_FILE}"
rm -f "${f_TRADE_HIST_FILE_INTERIM}"
unset f_open_trade
echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
fi
## Chart Part