From 1423fdbe710fe961b094523a4459a70009a48254 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 28 Nov 2023 17:10:57 +0100 Subject: [PATCH] analyze 2 analyze --- dabo/analyze.sh | 10 ++++++++++ dabo/functions/check_buy_conditions.sh | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 0ea761e..9f95636 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -119,6 +119,16 @@ function analyze { fi fi + if [ -n "$f_BUY" ] + then + set -x + echo "BUY: ${f_BUY}" + f_open_trade=1 + BUY_PRICE=$f_price + f_BUY="" + set +x + fi + if [ -n "${f_SELL}" ] then set -x diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index f0a9767..28187f2 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -105,17 +105,17 @@ function check_buy_conditions { f_BUY="" fi - # ANALYZE - if [ -n "$f_BUY" ] && [ -z "${BOT}" ] - then - echo "BUY: ${f_BUY}" -#echo "${csv_headline},Marketperformance -#${f_last_line}" | cut -d, -f 2-22 | perl -pe 's/([0-9].[0-9][0-9][0-9][0-9][0-9][0-9])[0-9]+/$1/g' | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, - f_open_trade=1 - #echo "${f_echo_prefix}${f_BUY}" >${g_tmp}/open-${tmpfile} - BUY_PRICE=$f_price - f_BUY="" - fi +# # ANALYZE +# if [ -n "$f_BUY" ] && [ -z "${BOT}" ] +# then +# echo "BUY: ${f_BUY}" +##echo "${csv_headline},Marketperformance +##${f_last_line}" | cut -d, -f 2-22 | perl -pe 's/([0-9].[0-9][0-9][0-9][0-9][0-9][0-9])[0-9]+/$1/g' | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, +# f_open_trade=1 +# #echo "${f_echo_prefix}${f_BUY}" >${g_tmp}/open-${tmpfile} +# BUY_PRICE=$f_price +# f_BUY="" +# fi