From daf1fc125630921794a62684d11f86325a7405c5 Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Sat, 1 Jun 2024 04:46:36 +0900 Subject: [PATCH] Update filtering --- src/strategy_team/future_strategy_long.rs | 2 +- src/strategy_team/future_strategy_short.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index 0ec325a..693fc69 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -355,7 +355,7 @@ pub async fn list_up_for_sell(all_data: &AllData, futures_exchange_info_map: &Ha is_sell = true; } else if supertrend_1m_map.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.area == SuperTrendArea::DOWN)) { is_sell = true; - } else if element.pure_profit_percent.is_sign_negative() && adx_vec.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.adx < 20.0)) { + } else if adx_vec.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.adx < 20.0)) { is_sell = true; } diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index 6182eb8..a7be45f 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -363,7 +363,7 @@ pub async fn list_up_for_sell(all_data: &AllData, futures_exchange_info_map: &Ha is_sell = true; } else if supertrend_1m_map.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.area == SuperTrendArea::UP)) { is_sell = true; - } else if element.pure_profit_percent.is_sign_negative() && adx_vec.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.adx < 20.0)) { + } else if adx_vec.get(&element.symbol).is_some_and(|a| a.len() > 10 && a.last().is_some_and(|b| b.close_time > server_epoch && b.adx < 20.0)) { is_sell = true; }