fixes if no EMA200 data available

This commit is contained in:
olli 2024-12-17 13:03:59 +01:00
parent a8132e3992
commit 6c0c786c70
2 changed files with 5 additions and 5 deletions

View File

@ -166,7 +166,7 @@ services:
resources:
limits:
cpus: '1'
memory: 2048M
memory: 512M
dabo-calc-levels:
build:

View File

@ -25,7 +25,7 @@ do
g_echo "scoring ECONOMY_${asset}"
# bullish? bull market?
if g_num_is_higher ${v[ECONOMY_${asset}_15m_close_0]} ${v[ECONOMY_${asset}_1d_ema200_0]}
[ -n "${v[ECONOMY_${asset}_1d_ema200_0]}" ] && if g_num_is_higher ${v[ECONOMY_${asset}_15m_close_0]} ${v[ECONOMY_${asset}_1d_ema200_0]}
then
score 2 "${asset} EMA200 over last 15m close"
else
@ -55,7 +55,7 @@ do
g_echo "scoring ECONOMY_${asset}"
# bullish? bull market?
if g_num_is_higher ${v[ECONOMY_${asset}_15m_close_0]} ${v[ECONOMY_${asset}_1d_ema200_0]}
[ -n "${v[ECONOMY_${asset}_1d_ema200_0]}" ] && if g_num_is_higher ${v[ECONOMY_${asset}_15m_close_0]} ${v[ECONOMY_${asset}_1d_ema200_0]}
then
score -2 "${asset} EMA200 over last 15m close"
else
@ -85,7 +85,7 @@ do
g_echo "scoring ${asset}"
# bullish? bull market?
if g_num_is_higher ${v[${asset}_15m_close_0]} ${v[${asset}_1d_ema200_0]}
[ -n "${v[${asset}_1d_ema200_0]}" ] && if g_num_is_higher ${v[${asset}_15m_close_0]} ${v[${asset}_1d_ema200_0]}
then
score 2 "${asset} EMA200 over last 15m close"
else
@ -129,7 +129,7 @@ do
g_echo "scoring ${asset}"
# bullish? bull market?
if g_num_is_higher ${v[${asset}_15m_close_0]} ${v[${asset}_1d_ema200_0]}
[ -n "${v[${asset}_1d_ema200_0]}" ] && if g_num_is_higher ${v[${asset}_15m_close_0]} ${v[${asset}_1d_ema200_0]}
then
score 2 "${asset} EMA200 over last 15m close"
else