From 5326e3f5bca550cc47199b15dfba8d59413df145 Mon Sep 17 00:00:00 2001 From: olli Date: Tue, 17 Dec 2024 11:07:40 +0100 Subject: [PATCH] fixes tp/sl --- dabo/functions/order.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dabo/functions/order.sh b/dabo/functions/order.sh index 4fbc982..34b365a 100644 --- a/dabo/functions/order.sh +++ b/dabo/functions/order.sh @@ -33,7 +33,15 @@ function order { local f_type f_side_opposite f_pos_side f_side_opposide f_trigger_sl f_trigger_tp ### validity checks ### - + + if [ -z "$f_symbol" ] || [ -z "$f_amount" ] || [ -z "$f_side" ] || [ -z "$f_price" ] + then + g_echo_error "Missing values! +Usage: order symbol amount side price [stoploss] [takeprofit] +Given: ${FUNCNAME} $@" + return 1 + fi + # check symbol XXX/$CURRENCY[:$CURRENCY] [[ $f_symbol =~ /$CURRENCY ]] || return 1