diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 8133dc6..1b028ae 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -46,6 +46,8 @@ function analyze { time=$(echo $line | cut -d, -f1 | cut -d: -f1,2) f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//') echo "$line" >>${g_tmp}/${tmpfile} + echo "${csv_headline},Marketperformance +${line},${f_market_performance}" | 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, >>${g_tmp}/output-${tmpfile} if [ -f "${g_tmp}/open-${tmpfile}" ] then if [ "${ANALYZE_VERBOSE}" -eq "0" ] diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index dc0f1e2..2445bf0 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},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, +#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, 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 6523e8c..0624ba3 100644 --- a/dabo/functions/check_sell_conditions.sh +++ b/dabo/functions/check_sell_conditions.sh @@ -81,8 +81,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},Marketperformace -${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, +# echo "${csv_headline},Marketperformace +#${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, echo "${f_SELL}" result=$(g_percentage-diff ${BUY_PRICE} ${current}) result=$(echo "${result}-${FEE}" | bc | sed 's/^\./0./; s/^-\./-0./')