diff --git a/README.md b/README.md index 814492c..e20c3da 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,10 @@ docker compose logs -f Update: ``` +# Optinal: Remove local data +git reset --hard HEAD^ # Remove local commits +git clean -fd # Remove local uncommited files + git pull -f --all ``` diff --git a/dabo/functions/get_ema.sh b/dabo/functions/get_ema.sh index a26272e..f7007b5 100644 --- a/dabo/functions/get_ema.sh +++ b/dabo/functions/get_ema.sh @@ -7,7 +7,14 @@ function get_ema { local f_lastvalue="$5" f_ema="" - + + # force minimum 15min timeframe + if [ $(echo "${INTERVAL} < 900" | bc -l) -ne 0 ] + then + f_period=$(echo "${f_period}*(900/${INTERVAL})" | bc -l | sed 's/\..*//') + g_echo "ATTENTION!!!! Period lower then 15 minutes - correcting to $f_period" + fi + # calculate EMA if last EMA is given if [ -n "$f_last_ema" ] then diff --git a/dabo/functions/get_macd_indicator.sh b/dabo/functions/get_macd_indicator.sh index d11188b..ff1463a 100644 --- a/dabo/functions/get_macd_indicator.sh +++ b/dabo/functions/get_macd_indicator.sh @@ -42,7 +42,7 @@ function get_macd_indicator { f_macd_last_ema9_signal=$(echo "$f_second_lastline" | cut -d, -f7) f_macd_last_histogram=$(echo "$f_second_lastline" | cut -d, -f8) - # calc EMA12 + # calc EMA12 get_ema "${f_hist_file}" 2 12 "${f_macd_last_ema12}" "${f_macd_lastprice}" if [ -z "${f_ema}" ] then