small fixes

This commit is contained in:
olli 2023-05-19 11:58:24 +02:00
parent 2d469a6330
commit bd3fec41e8
2 changed files with 4 additions and 4 deletions

View File

@ -94,9 +94,9 @@ ${f_BUY}"
# ANALYZE
if [ -n "$f_BUY" ] && [ -z "${BOT}" ]
then
echo "BUY: ${f_echo_prefix} All BUY conditions met!!!"
echo "BUY: ${f_echo_prefix}${f_BUY}"
echo "${csv_headline}
${f_BUY}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s,
${f_last_line}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s,
echo "$f_BUY" >${g_tmp}/open-${tmpfile}
BUY_PRICE=$current
f_BUY=""

View File

@ -78,8 +78,8 @@ function check_sell_conditions {
then
echo "SELL: $(tail -n1 ${f_ASSET_HIST_FILE} | cut -d, -f1)"
echo "${csv_headline}
${f_last_line}
${f_SELL}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s,
${f_last_line}" | 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./')
echo "${result}" >>${g_tmp}/result-${tmpfile}