analyze 2 analyze
This commit is contained in:
parent
1423fdbe71
commit
3b1873616c
@ -119,30 +119,27 @@ function analyze {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$f_BUY" ]
|
|
||||||
then
|
|
||||||
set -x
|
set -x
|
||||||
|
if [ -n "${f_BUY}" ]
|
||||||
|
then
|
||||||
echo "BUY: ${f_BUY}"
|
echo "BUY: ${f_BUY}"
|
||||||
f_open_trade=1
|
f_open_trade=1
|
||||||
BUY_PRICE=$f_price
|
BUY_PRICE=$f_price
|
||||||
f_BUY=""
|
|
||||||
set +x
|
|
||||||
fi
|
fi
|
||||||
|
set +x
|
||||||
|
|
||||||
if [ -n "${f_SELL}" ]
|
# if [ -n "${f_SELL}" ]
|
||||||
then
|
# then
|
||||||
set -x
|
# echo "SELL: ${f_date} ${f_SELL}"
|
||||||
echo "SELL: ${f_date} ${f_SELL}"
|
# g_percentage-diff ${BUY_PRICE} ${f_price}
|
||||||
g_percentage-diff ${BUY_PRICE} ${f_price}
|
# g_calc "${g_percentage_diff_result}-${FEE}"
|
||||||
g_calc "${g_percentage_diff_result}-${FEE}"
|
# result=${g_calc_result}
|
||||||
result=${g_calc_result}
|
# echo "${result}" >>${g_tmp}/result-${tmpfile}
|
||||||
echo "${result}" >>${g_tmp}/result-${tmpfile}
|
# rm -f "${f_TRADE_HIST_FILE}"
|
||||||
rm -f "${f_TRADE_HIST_FILE}"
|
# rm -f "${f_TRADE_HIST_FILE_INTERIM}"
|
||||||
rm -f "${f_TRADE_HIST_FILE_INTERIM}"
|
# unset f_open_trade
|
||||||
unset f_open_trade
|
# echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
|
||||||
echo "RESULT: ${result}% (${BUY_PRICE} -> ${f_price})"
|
# fi
|
||||||
set +x
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
## Chart Part
|
## Chart Part
|
||||||
|
@ -44,11 +44,11 @@ function check_buy_conditions {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# if this checks came from sell function
|
# if this checks came from sell function
|
||||||
if [ "$2" == "SELL" ]
|
#if [ "$2" == "SELL" ]
|
||||||
then
|
#then
|
||||||
[ -n "$f_BUY" ] && return 1
|
# [ -n "$f_BUY" ] && return 1
|
||||||
return 0
|
# return 0
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
### Buy or not buy?
|
### Buy or not buy?
|
||||||
# BOT
|
# BOT
|
||||||
|
Loading…
Reference in New Issue
Block a user