csv headline in buy/sell message

This commit is contained in:
olli 2023-05-13 21:03:15 +02:00
parent 73d0564f36
commit 854dfe1b58
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -144,9 +144,9 @@ function check_sell_conditions {
# ANALYZE
if [ -n "${f_SELL}" ] && [ -z "${BOT}" ]
then
echo "SELL: $(tail -n1 ${f_ASSET_HIST_FILE} | cut -d, -f1) ===
${csv_headline}
$f_SELL"
echo "SELL: $(tail -n1 ${f_ASSET_HIST_FILE} | cut -d, -f1)"
echo "${csv_headline}
${f_SELL}" | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s,
result=$(g_percentage-diff ${BUY_PRICE} ${current})
result=$(echo "${result}-${FEE}" | bc | sed 's/^\./0./; s/^-\./-0./')
echo "${result}" >>${g_tmp}/result-${tmpfile}