From 70ed81ce910b31e96681d2d5fb6608058618cf4c Mon Sep 17 00:00:00 2001 From: olli Date: Fri, 27 Oct 2023 11:18:25 +0200 Subject: [PATCH] strategy buy signal --- dabo/functions/check_buy_conditions.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dabo/functions/check_buy_conditions.sh b/dabo/functions/check_buy_conditions.sh index 31a6958..f5a1f60 100644 --- a/dabo/functions/check_buy_conditions.sh +++ b/dabo/functions/check_buy_conditions.sh @@ -109,6 +109,7 @@ function check_buy_conditions_strategy { # load strategy local f_echo_prefix="BUY ${f_ASSET}@${CURRENCY}:${f_price}:${f_strategy} - " + f_do_buy="" if [ -s "${f_strategy}" ] then . "${f_strategy}" || return 1 @@ -118,6 +119,12 @@ function check_buy_conditions_strategy { fi [ -n "${BOT}" ] && g_echo_note "${f_echo_prefix}Running BUY checks" + # Check buy signal from strategy + if [ -n "${f_do_buy}" ] + then + echo " ${f_echo_prefix} Strategy buy signal: ${f_do_buy}" + return 0 + fi # Check market-performance if [ $(echo "${f_market_performance} > ${GOOD_MARKET_PERFORMANCE_INDEX}" | bc -l) -eq 0 ]