From 1e64873e4cd5c6c9de8b7b12b6fb028ef5e80708 Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Sat, 25 May 2024 17:45:09 +0900 Subject: [PATCH] Update filtering --- src/strategy_team/future_strategy_long.rs | 6 +++--- src/strategy_team/future_strategy_short.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index 5e0148f..b31c4d6 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -177,7 +177,7 @@ pub async fn list_up_for_sell(all_data: &AllData) -> Result<(), Box Result<(), Box= target_profit_percent * 2.0 { + if element.pure_profit_percent >= target_profit_percent * 2.5 { is_sell = true; - } else if element.pure_profit_percent <= target_profit_percent * -1.5 { + } else if element.pure_profit_percent <= target_profit_percent * -2.0 { is_sell = true; } else if server_epoch - element.transact_time >= (900_000) * 1 { // time up selling diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index f002f5a..412dda8 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -176,7 +176,7 @@ pub async fn list_up_for_sell(all_data: &AllData) -> Result<(), Box Result<(), Box= target_profit_percent * 2.0 { + if element.pure_profit_percent >= target_profit_percent * 2.5 { is_sell = true; - } else if element.pure_profit_percent <= target_profit_percent * -1.5 { + } else if element.pure_profit_percent <= target_profit_percent * -2.0 { is_sell = true; } else if server_epoch - element.transact_time >= (900_000) * 1 { // time up selling