diff --git a/dabo/analyze.sh b/dabo/analyze.sh index d9890ff..91fc253 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -141,7 +141,7 @@ then fi -echo "OVERALL RESULT: $(cat ${g_tmp}/overall-result-* | awk "{ SUM += \$1 / ${analyzecounter} } END { printf(\"%2.2f\", SUM) }')%" | tee analyze-${analyzedate}/overall-result.log +echo "OVERALL RESULT: $(cat ${g_tmp}/overall-result-* | awk "{ SUM += \$1 / ${analyzecounter} } END { printf(\"%2.2f\", SUM) }")%" | tee analyze-${analyzedate}/overall-result.log cat analyze-${analyzedate}/*.history.csv.log >analyze-${analyzedate}/analyze-overall.log echo "" | tee -a analyze-${analyzedate}/overall-result.log echo "Trades: $(grep "BUY: " analyze-${analyzedate}/analyze-overall.log | wc -l)" | tee -a analyze-${analyzedate}/overall-result.log diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index 6c17d89..02cf8ef 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -96,7 +96,7 @@ ${f_BUY}" then echo "BUY: ${f_echo_prefix}${f_BUY}" echo "${csv_headline} -${f_last_line}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, +${f_last_line}" | cut -d, -f 2-21 | 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 6c17851..4799975 100644 --- a/dabo/functions/check_sell_conditions.sh +++ b/dabo/functions/check_sell_conditions.sh @@ -78,7 +78,7 @@ function check_sell_conditions { then echo "SELL: $(tail -n1 ${f_ASSET_HIST_FILE} | cut -d, -f1)" echo "${csv_headline} -${f_last_line}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s, +${f_last_line}" | cut -d, -f 2-21 | 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./')