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