market order fix
This commit is contained in:
parent
4e2c90fe0b
commit
cd55084d54
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user