From 59a5e540ac083758c3105e47f9a01ab19cdbf4d8 Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Sun, 26 May 2024 07:53:45 +0900 Subject: [PATCH] Update filtering --- src/strategy_team/future_strategy_long.rs | 43 ++++++++++++++++++++++ src/strategy_team/future_strategy_short.rs | 42 +++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index b960cb9..6fd61bd 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -278,6 +278,45 @@ pub async fn list_up_for_sell(all_data: &AllData) -> Result<(), Box Result<(), Box 1_800_000 { is_sell = true; + } else if target_profit_percent.is_normal() && element.pure_profit_percent > target_profit_percent * 2.5 { + is_sell = true; + } else if target_profit_percent.is_normal() && element.pure_profit_percent < target_profit_percent * -1.5 { + is_sell = true; } if is_sell == true { diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index aeb0919..74d5d04 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -277,6 +277,44 @@ pub async fn list_up_for_sell(all_data: &AllData) -> Result<(), Box Result<(), Box 1_800_000 { is_sell = true; + } else if target_profit_percent.is_normal() && element.pure_profit_percent > target_profit_percent * 2.5 { + is_sell = true; + } else if target_profit_percent.is_normal() && element.pure_profit_percent < target_profit_percent * -1.5 { + is_sell = true; } if is_sell == true {