doc, output fix

This commit is contained in:
olli 2023-05-09 17:23:46 +02:00
parent 88812cf9ab
commit 12d1dc08bc
2 changed files with 10 additions and 10 deletions

View File

@ -165,7 +165,7 @@ strategies/sell.command-kirk-3.conf
## Set Rights
Set Rights (UID 10000 for non-root-User in running container):
```
chown -R 10000:10000 dabo data home strategy
chown -R 10000:10000 dabo data home strategies dabo-bot.conf
```

View File

@ -48,17 +48,20 @@ function check_buy_conditions {
return 0
fi
# MACD
# no negative or empty values
echo "${f_macd_histogram_relation}" | grep -q "^[0-9]" || return 0
# check for conditions
if [ ${f_macd_histogram_relation} -le ${BUY_MACD_RELATION_FROM} ] || [ ${f_macd_histogram_relation} -ge ${BUY_MACD_RELATION_TO} ]
if echo "${f_macd_histogram_relation}" | grep -q "^[0-9]"
then
g_echo_note "${f_echo_prefix}MACD conditions NOT met"
# check for conditions
if [ ${f_macd_histogram_relation} -le ${BUY_MACD_RELATION_FROM} ] || [ ${f_macd_histogram_relation} -ge ${BUY_MACD_RELATION_TO} ]
then
g_echo_note "${f_echo_prefix}MACD conditions NOT met"
return 0
fi
else
g_echo_note "${f_echo_prefix}f_macd_histogram_relation empty or negative"
return 0
fi
# RSI
if \
[ ${f_rsi5} -le ${BUY_RSI5_SIGNAL_UNTIL} ] && \
@ -84,7 +87,6 @@ function check_buy_conditions {
return 0
fi
# Price change
if \
[ $(echo "${f_price_change_1_day} > ${BUY_MIN_PRICE_CHANGE_LAST_1_DAY}" | bc -l) -ne 0 ] && \
@ -98,7 +100,6 @@ function check_buy_conditions {
return 0
fi
if [ -n "$f_BUY" ]
then
# Check for beginning MACD Trend
@ -124,7 +125,6 @@ function check_buy_conditions {
g_echo_note "BUY ${f_ASSET}@${CURRENCY}:${f_price} MACD Histogram not rising (now ${f_macd_histogram} < 1 before ${f_macd_histogram_before} < 2 before ${f_macd_histogram_2before} < 3 before ${f_macd_histogram_3before} < 4 before ${f_macd_histogram_4before} < 5 before ${f_macd_histogram_5before}) - trend loses strength / not growing - don't buy"
return 0
fi
fi