From 0181800430e6e2b9848d82bf464252b4fa530848 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 23 Dec 2024 22:31:12 +0100 Subject: [PATCH] cleanup --- dabo/dabo-bot.sh | 32 ++------------------------------ dabo/functions/get_levels.sh | 1 + 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/dabo/dabo-bot.sh b/dabo/dabo-bot.sh index 87c2171..0d9b370 100755 --- a/dabo/dabo-bot.sh +++ b/dabo/dabo-bot.sh @@ -71,42 +71,14 @@ do # Timestamp export f_timestamp=$(g_date_print) - -####### TODO -> Funktionen überarbeiten ############ -# -# # get minute interval for find -mmin (used by get_marketdata market_performance -# INTERVAL_MIN=$(echo "${INTERVAL}/60-1" | bc -l | sed -r 's/^(-?)\./\10./' | cut -d\. -f1) -# [ -z "${INTERVAL_MIN}" ] && INTERVAL_MIN=1 -# -# ### get general market data -# # Get coingecko data -# get_coingecko_data -# -# # Get current MarketData -# get_marketdata -# -# # Check the situation on the market -# if ! market_performance -# then -# f_market_performance=$(cat MARKET_PERFORMANCE_LATEST) -# fi -####### TODO -> Funktionen überarbeiten ENDE ########### - - - ## watch some manual defined assets - #watch_assets - if [ "${STOCK_EXCHANGE}" = "NONE" ] then ## stop here if STOCK_EXCHANGE not present continue fi - # Get current symbols - #[ ${FULL_LOOP} = 1 ] && get_symbols_ticker - - # Sell something? - #check_for_sell + # clean old data + [ ${FULL_LOOP} = 1 ] && find asset-histories -maxdepth 1 ! -type d ! -name "*.csv" ! -name "*.levels" ! -name "*.zones" ! -name "*.indicators-calculated" -mtime +1 # Get current balance [ ${FULL_LOOP} = 1 ] && get_balance || continue diff --git a/dabo/functions/get_levels.sh b/dabo/functions/get_levels.sh index ee62242..131bc21 100644 --- a/dabo/functions/get_levels.sh +++ b/dabo/functions/get_levels.sh @@ -70,6 +70,7 @@ function get_levels { # reset old levels var unset f_levels + unset f_zones local f_levelsfile=$1 if ! [ -s "$f_levelsfile" ]