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

View File

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