diff --git a/README.md b/README.md index d9fdc78..814492c 100644 --- a/README.md +++ b/README.md @@ -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) - Overview trades/profits/losses for tax declaration - Support for decentralized exchanges like uniswap to gain more "security" -- updatemanagement - immuteable .config -- archive old or large csv files +- Archive/compress old or large CSV-History-files diff --git a/dabo/analyze.sh b/dabo/analyze.sh index 1127489..e059f21 100755 --- a/dabo/analyze.sh +++ b/dabo/analyze.sh @@ -39,6 +39,14 @@ function analyze { ORIGIFS="$IFS" IFS=$'\n' 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") do IFS="$ORIGIFS" @@ -99,10 +107,11 @@ function analyze { } -. dabo/dabo-bot.conf -. dabo-bot.conf -. analyze.conf -set | grep ^[A-Z].*=[-0-9] +for conf in dabo/dabo-bot.conf dabo-bot.conf analyze.conf +do + . $conf + cat $conf +done if [ "${ANALYZE_BATCH}" -eq "0" ] then diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index d82e007..bca461c 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -180,7 +180,7 @@ ${f_BUY}" # ANALYZE if [ -n "$f_BUY" ] && [ -z "${BOT}" ] 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} BUY_PRICE=$current fi diff --git a/dabo/functions/check_sell_conditions.sh b/dabo/functions/check_sell_conditions.sh index 88aeef6..4fde0e3 100644 --- a/dabo/functions/check_sell_conditions.sh +++ b/dabo/functions/check_sell_conditions.sh @@ -19,7 +19,7 @@ function check_sell_conditions { g_echo_note "${f_echo_prefix}Strategy file not found" return 1 fi - g_echo_note "${f_echo_prefix}Running BUY checks" + g_echo_note "${f_echo_prefix}Running SELL checks" ### check current result