From cd55084d549fde581284b5e53cd1dd1960bcf22f Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 27 Nov 2024 14:50:30 +0100 Subject: [PATCH] market order fix --- dabo/functions/order.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dabo/functions/order.sh b/dabo/functions/order.sh index d914e16..401b216 100644 --- a/dabo/functions/order.sh +++ b/dabo/functions/order.sh @@ -104,7 +104,7 @@ function order { # Add stoploos and take profit if available - if [ -n "$f_stoploss" ] + if [ -n "$f_stoploss" ] && [[ $f_type = limit ]] then # check for long if [[ $f_side = buy ]] && g_num_is_higher_equal $f_stoploss $f_price @@ -122,7 +122,7 @@ function order { f_stoploss=$f_ccxt_result f_params="${f_params}'stopLossPrice': '$f_stoploss', " fi - if [ -n "$f_takeprofit" ] + if [ -n "$f_takeprofit" ] && [[ $f_type = limit ]] then # check for long if [[ $f_side = buy ]] && g_num_is_lower_equal $f_takeprofit $f_price