From f5715ab24a309e9144048e5de0030fe758c9b092 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 1 Nov 2023 13:53:08 +0100 Subject: [PATCH] fix --- dabo/functions/check_sell_conditions.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/dabo/functions/check_sell_conditions.sh b/dabo/functions/check_sell_conditions.sh index 269d558..40a5418 100644 --- a/dabo/functions/check_sell_conditions.sh +++ b/dabo/functions/check_sell_conditions.sh @@ -13,6 +13,13 @@ function check_sell_conditions { ### check current result + # result values (sould be reduced to one - f_result!?) + f_result=$(g_percentage-diff ${f_BUY_PRICE} ${f_price}) + f_BUY_PRICE_LAST_RATE_DIFF=${f_result} + result=${f_BUY_PRICE_LAST_RATE_DIFF} + f_real_result=$(echo "${f_result}-${FEE}" | bc) + + # bot if [ -n "${BOT}" ] then @@ -32,11 +39,11 @@ function check_sell_conditions { echo "INTERIM RESULT: ${f_BUY_PRICE_LAST_RATE_DIFF}%" fi - # result values (sould be reduced to one - f_result!?) - f_result=$(g_percentage-diff ${f_BUY_PRICE} ${f_price}) - f_BUY_PRICE_LAST_RATE_DIFF=${f_result} - result=${f_BUY_PRICE_LAST_RATE_DIFF} - f_real_result=$(echo "${f_result}-${FEE}" | bc) +# # result values (sould be reduced to one - f_result!?) +# f_result=$(g_percentage-diff ${f_BUY_PRICE} ${f_price}) +# f_BUY_PRICE_LAST_RATE_DIFF=${f_result} +# result=${f_BUY_PRICE_LAST_RATE_DIFF} +# f_real_result=$(echo "${f_result}-${FEE}" | bc) # store new interim result echo ${f_BUY_PRICE_LAST_RATE_DIFF} >>${f_TRADE_HIST_FILE_INTERIM}