From 96f7e0c20ef166c8e4fb13864258c8a254906d25 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 22 May 2023 11:50:27 +0200 Subject: [PATCH] better analyze.sh output --- dabo/functions/check_buy_conditions.sh | 4 ++-- dabo/functions/check_sell_conditions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index 02cf8ef..3ee5ba6 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -95,8 +95,8 @@ ${f_BUY}" if [ -n "$f_BUY" ] && [ -z "${BOT}" ] then echo "BUY: ${f_echo_prefix}${f_BUY}" -echo "${csv_headline} -${f_last_line}" | cut -d, -f 2-21 | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, +echo "${csv_headline},Marketperformance +${f_last_line},${f_market_performance}" | cut -d, -f 2-22 | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, echo "$f_BUY" >${g_tmp}/open-${tmpfile} BUY_PRICE=$current f_BUY="" diff --git a/dabo/functions/check_sell_conditions.sh b/dabo/functions/check_sell_conditions.sh index 4799975..b8c37ca 100644 --- a/dabo/functions/check_sell_conditions.sh +++ b/dabo/functions/check_sell_conditions.sh @@ -77,8 +77,8 @@ function check_sell_conditions { if [ -n "${f_SELL}" ] && [ -z "${BOT}" ] then echo "SELL: $(tail -n1 ${f_ASSET_HIST_FILE} | cut -d, -f1)" - echo "${csv_headline} -${f_last_line}" | cut -d, -f 2-21 | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, + echo "${csv_headline},Marketperformace +${f_last_line},${f_market_performance}" | cut -d, -f 2-222 | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, echo "${f_SELL}" result=$(g_percentage-diff ${BUY_PRICE} ${current}) result=$(echo "${result}-${FEE}" | bc | sed 's/^\./0./; s/^-\./-0./')