fix typo
This commit is contained in:
parent
0109799a4c
commit
21125e84e5
@ -145,8 +145,9 @@ function get_position_line_vars {
|
||||
f_position_takeprofit_price=${f_position_array[7]}
|
||||
fi
|
||||
|
||||
printf -v f_position_asset_amount %.2f ${f_position_array[8]}
|
||||
p[${f_asset}_asset_amount]=$f_position_asset_amount
|
||||
#printf -v f_position_asset_amount %.2f ${f_position_array[8]}
|
||||
#p[${f_asset}_asset_amount]=$f_position_asset_amount
|
||||
p[${f_asset}_asset_amount]=${f_position_array[8]}
|
||||
|
||||
# calc pnl percentage
|
||||
if [[ $f_position_side = long ]]
|
||||
|
@ -147,7 +147,8 @@ function order {
|
||||
# stoploss (change) for open position
|
||||
elif [[ $f_type = "stoploss" ]]
|
||||
then
|
||||
f_params="${f_params}'reduceOnly': True, 'triggerPrice': $f_stoploss, 'triggerDirection': 'down', 'type': 'market'"
|
||||
f_type="market"
|
||||
f_params="${f_params}'reduceOnly': True, 'triggerPrice': $f_stoploss, 'triggerDirection': 'down', 'type': '$f_type'"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$f_takeprofit" ]
|
||||
@ -172,7 +173,8 @@ function order {
|
||||
[[ $f_type =~ limit|market ]] && f_params="${f_params}'takeProfit': { 'triggerPrice': $f_takeprofit, 'type': 'limit', 'price': $f_takeprofit, }, "
|
||||
if [[ $f_type = "takeprofit" ]]
|
||||
then
|
||||
f_params="${f_params}'reduceOnly': True, 'triggerPrice': $f_takeprofit, 'triggerDirection': 'up', 'type': 'limit'"
|
||||
f_type="limit"
|
||||
f_params="${f_params}'reduceOnly': True, 'triggerPrice': $f_takeprofit, 'triggerDirection': 'up', 'type': '$f_type'"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user