multiple orders in array

This commit is contained in:
olli 2024-09-24 17:07:11 +02:00
parent a45b4e5f51
commit 4cbff23680

View File

@ -102,18 +102,18 @@ function get_order_line_vars {
local f_type local f_type
if [[ $f_order_type = limit ]] if [[ $f_order_type = limit ]]
then then
[[ $f_order_type = buy ]] && f_type="open_long" [[ $f_order_side = buy ]] && f_type="open_long"
[[ $f_order_type = sell ]] && f_type="open_short" [[ $f_order_side = sell ]] && f_type="open_short"
fi fi
if [[ $f_order_type = Stop ]] if [[ $f_order_type = Stop ]]
then then
[[ $f_order_type = buy ]] && f_type="sl_close_short" [[ $f_order_side = buy ]] && f_type="sl_close_short"
[[ $f_order_type = sell ]] && f_type="sl_close_long" [[ $f_order_side = sell ]] && f_type="sl_close_long"
fi fi
if [[ $f_order_type = MarketIfTouched ]] if [[ $f_order_type = MarketIfTouched ]]
then then
[[ $f_order_type = buy ]] && f_type="tp_close_short" [[ $f_order_side = buy ]] && f_type="tp_close_short"
[[ $f_order_type = sell ]] && f_type="tp_close_long" [[ $f_order_side = sell ]] && f_type="tp_close_long"
fi fi
o[${f_asset}_${f_type}_type]=${f_order_array[1]} o[${f_asset}_${f_type}_type]=${f_order_array[1]}