Fix wrong selling

This commit is contained in:
Sik Yoon 2024-01-13 19:45:54 +09:00
parent 61844671ba
commit 830be77c03

View File

@ -256,18 +256,7 @@ pub async fn list_up_for_sell(
if (element.is_long == 0 || element.is_long == 1)
&& !element.current_price.is_zero()
{
if element.current_price >= element.target_price
{
limit_order_sell(
&element,
element.current_price,
base_qty_to_be_ordered,
&client,
&exchange_info_vec,
&trade_fee_vec,
)
.await;
} else if element.current_price <= element.stoploss {
if element.current_price <= element.stoploss {
limit_order_sell(
&element,
element.current_price,