strategy buy signal
This commit is contained in:
parent
ea6962a10f
commit
70ed81ce91
@ -109,6 +109,7 @@ function check_buy_conditions_strategy {
|
|||||||
|
|
||||||
# load strategy
|
# load strategy
|
||||||
local f_echo_prefix="BUY ${f_ASSET}@${CURRENCY}:${f_price}:${f_strategy} - "
|
local f_echo_prefix="BUY ${f_ASSET}@${CURRENCY}:${f_price}:${f_strategy} - "
|
||||||
|
f_do_buy=""
|
||||||
if [ -s "${f_strategy}" ]
|
if [ -s "${f_strategy}" ]
|
||||||
then
|
then
|
||||||
. "${f_strategy}" || return 1
|
. "${f_strategy}" || return 1
|
||||||
@ -118,6 +119,12 @@ function check_buy_conditions_strategy {
|
|||||||
fi
|
fi
|
||||||
[ -n "${BOT}" ] && g_echo_note "${f_echo_prefix}Running BUY checks"
|
[ -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
|
# Check market-performance
|
||||||
if [ $(echo "${f_market_performance} > ${GOOD_MARKET_PERFORMANCE_INDEX}" | bc -l) -eq 0 ]
|
if [ $(echo "${f_market_performance} > ${GOOD_MARKET_PERFORMANCE_INDEX}" | bc -l) -eq 0 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user