better analyze.sh output

This commit is contained in:
olli 2023-05-22 11:41:57 +02:00
parent bbbf58b367
commit c1de6d9485
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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=""

View File

@ -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./')