fixes
This commit is contained in:
parent
95d9ce2a6c
commit
4510794f32
@ -59,7 +59,7 @@ function analyze {
|
|||||||
do
|
do
|
||||||
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
|
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
|
||||||
then
|
then
|
||||||
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} #2>&1
|
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} 2>&1
|
||||||
else
|
else
|
||||||
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
|
check_sell_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
|
||||||
fi
|
fi
|
||||||
@ -72,7 +72,7 @@ function analyze {
|
|||||||
do
|
do
|
||||||
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
|
if [ "${ANALYZE_VERBOSE}" -eq "0" ]
|
||||||
then
|
then
|
||||||
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} #2>&1 || break
|
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" >>${g_tmp}/output-${tmpfile} 2>&1 || break
|
||||||
else
|
else
|
||||||
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
|
check_buy_conditions ${g_tmp}/${tmpfile} "${f_strategy}" 2>&1 | tee -a ${g_tmp}/output-${tmpfile}
|
||||||
fi
|
fi
|
||||||
|
@ -35,6 +35,9 @@ function check_sell_conditions {
|
|||||||
echo "${f_last_line}"
|
echo "${f_last_line}"
|
||||||
echo "INTERIM RESULT: ${f_BUY_PRICE_LAST_RATE_DIFF}%"
|
echo "INTERIM RESULT: ${f_BUY_PRICE_LAST_RATE_DIFF}%"
|
||||||
fi
|
fi
|
||||||
|
# store new interim result
|
||||||
|
echo ${f_BUY_PRICE_LAST_RATE_DIFF} >>${f_TRADE_HIST_FILE_INTERIM}
|
||||||
|
|
||||||
|
|
||||||
# run strategy
|
# run strategy
|
||||||
if [ -s "${f_strategy}" ]
|
if [ -s "${f_strategy}" ]
|
||||||
@ -46,6 +49,7 @@ function check_sell_conditions {
|
|||||||
fi
|
fi
|
||||||
g_echo_note "${f_echo_prefix}Running SELL checks"
|
g_echo_note "${f_echo_prefix}Running SELL checks"
|
||||||
|
|
||||||
|
|
||||||
# check if the result (profit/loss until now) is lowering and sell if too low ()
|
# check if the result (profit/loss until now) is lowering and sell if too low ()
|
||||||
if [ -f ${f_TRADE_HIST_FILE_INTERIM} ]
|
if [ -f ${f_TRADE_HIST_FILE_INTERIM} ]
|
||||||
then
|
then
|
||||||
@ -68,9 +72,6 @@ function check_sell_conditions {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# store new interim result
|
|
||||||
echo ${f_BUY_PRICE_LAST_RATE_DIFF} >>${f_TRADE_HIST_FILE_INTERIM}
|
|
||||||
|
|
||||||
|
|
||||||
# Sell on MACD Condition
|
# Sell on MACD Condition
|
||||||
if [ $(echo "${f_macd_histogram_relation} < ${SELL_MACD_RELATION_FROM}" | bc -l) -ne 0 ]
|
if [ $(echo "${f_macd_histogram_relation} < ${SELL_MACD_RELATION_FROM}" | bc -l) -ne 0 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user