small fixes

This commit is contained in:
olli 2023-05-10 14:44:08 +02:00
parent 7ad3161e88
commit 89f72c7a45
4 changed files with 16 additions and 8 deletions

View File

@ -203,6 +203,5 @@ The access rights to this file should be set to the minimum necessary for securi
- Crypto preferences (While/Blacklist for certain currencies) - Crypto preferences (While/Blacklist for certain currencies)
- Overview trades/profits/losses for tax declaration - Overview trades/profits/losses for tax declaration
- Support for decentralized exchanges like uniswap to gain more "security" - Support for decentralized exchanges like uniswap to gain more "security"
- updatemanagement - immuteable .config - Archive/compress old or large CSV-History-files
- archive old or large csv files

View File

@ -39,6 +39,14 @@ function analyze {
ORIGIFS="$IFS" ORIGIFS="$IFS"
IFS=$'\n' IFS=$'\n'
local f_strategy local f_strategy
lines=$(egrep "^${ANALYZE_TIME}" "$file" | wc -l)
if [ $lines -lt 25 ]
then
g_echo "Only $lines lines for given timeframe (${ANALYZE_TIME}) in $file - ignoring files with less then 25!"
return 1
fi
for line in $(egrep "^${ANALYZE_TIME}" "$file") for line in $(egrep "^${ANALYZE_TIME}" "$file")
do do
IFS="$ORIGIFS" IFS="$ORIGIFS"
@ -99,10 +107,11 @@ function analyze {
} }
. dabo/dabo-bot.conf for conf in dabo/dabo-bot.conf dabo-bot.conf analyze.conf
. dabo-bot.conf do
. analyze.conf . $conf
set | grep ^[A-Z].*=[-0-9] cat $conf
done
if [ "${ANALYZE_BATCH}" -eq "0" ] if [ "${ANALYZE_BATCH}" -eq "0" ]
then then

View File

@ -180,7 +180,7 @@ ${f_BUY}"
# ANALYZE # ANALYZE
if [ -n "$f_BUY" ] && [ -z "${BOT}" ] if [ -n "$f_BUY" ] && [ -z "${BOT}" ]
then then
echo "BUY: $(echo ${f_last_line} | cut -d, -f1) === $f_BUY" echo "BUY: ${f_echo_prefix} All BUY conditions met!!! $f_BUY"
echo "$f_BUY" >${g_tmp}/open-${tmpfile} echo "$f_BUY" >${g_tmp}/open-${tmpfile}
BUY_PRICE=$current BUY_PRICE=$current
fi fi

View File

@ -19,7 +19,7 @@ function check_sell_conditions {
g_echo_note "${f_echo_prefix}Strategy file not found" g_echo_note "${f_echo_prefix}Strategy file not found"
return 1 return 1
fi fi
g_echo_note "${f_echo_prefix}Running BUY checks" g_echo_note "${f_echo_prefix}Running SELL checks"
### check current result ### check current result