added chart

This commit is contained in:
olli 2023-10-29 10:47:49 +01:00
parent d6ba55b752
commit 8491f0583d

View File

@ -32,32 +32,11 @@ function check_sell_conditions {
echo "INTERIM RESULT: ${f_BUY_PRICE_LAST_RATE_DIFF}%"
fi
# result values (sould be reduced to one - f_result!?)
f_BUY_PRICE_LAST_RATE_DIFF=$(g_percentage-diff ${f_BUY_PRICE} ${f_price})
result=${f_BUY_PRICE_LAST_RATE_DIFF}
f_result=${f_BUY_PRICE_LAST_RATE_DIFF}
# if [ -n "${BOT}" ]
# then
# f_TRADE_HIST_FILE="$(ls -1tr trade-histories/trade-*${f_ASSET}-open.history.csv | tail -n1)"
# if ! [ -s "${f_TRADE_HIST_FILE}" ]
# then
# g_echo_note "${f_echo_prefix}No trade history file (${f_TRADE_HIST_FILE}) found - ignoring"
# return 0
# fi
# f_TRADE_HIST_FILE_INTERIM=$(echo ${f_TRADE_HIST_FILE} | sed 's/-open\.history\.csv$/-interim.history.csv/')
# local f_BUY_PRICE=$(grep -i ',BUY,' $f_TRADE_HIST_FILE | tail -n1 | cut -d, -f5)
# local f_BUY_PRICE_LAST_RATE_DIFF=$(g_percentage-diff ${f_BUY_PRICE} ${f_price})
# local f_result=f_BUY_PRICE_LAST_RATE_DIFF
# # Store for overview
# echo ${f_BUY_PRICE_LAST_RATE_DIFF} >DIFF_BUY_PRICE_${f_ASSET}
# else
# f_TRADE_HIST_FILE="${g_tmp}/open-${tmpfile}"
# f_TRADE_HIST_FILE_INTERIM="${g_tmp}/interim-${tmpfile}"
# f_BUY_PRICE_LAST_RATE_DIFF=$(g_percentage-diff ${BUY_PRICE} ${f_price})
# f_BUY_PRICE=${BUY_PRICE}
# result=${f_BUY_PRICE_LAST_RATE_DIFF}
# echo "INTERIM RESULT: ${f_BUY_PRICE_LAST_RATE_DIFF}%"
# fi
# store new interim result
echo ${f_BUY_PRICE_LAST_RATE_DIFF} >>${f_TRADE_HIST_FILE_INTERIM}