From 6dfdc719c39775acf21cf4a5b5e3140cb1219844 Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Sat, 8 Jun 2024 20:00:54 +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 84325d7..1a05876 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -48,7 +48,7 @@ pub async fn list_up_for_buy( && lr_vec[lr_vec.len()-2].lr_value > lr_vec[lr_vec.len()-3].lr_value && lr_vec.last().unwrap().r_squared <= 0.15 && lr_vec[lr_vec.len()-1].lr_value >= sma_vec[sma_vec.len()-1].sma_value - && lr_vec[lr_vec.len()-2].lr_value <= sma_vec[sma_vec.len()-1].sma_value + && lr_vec[lr_vec.len()-2].lr_value <= sma_vec[sma_vec.len()-2].sma_value { values.closetime = current_info.1; do_buy = true; diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index 6c01b19..631ad49 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -48,7 +48,7 @@ pub async fn list_up_for_buy( && lr_vec[lr_vec.len()-2].lr_value < lr_vec[lr_vec.len()-3].lr_value && lr_vec.last().unwrap().r_squared <= 0.15 && lr_vec[lr_vec.len()-1].lr_value <= sma_vec[sma_vec.len()-1].sma_value - && lr_vec[lr_vec.len()-2].lr_value >= sma_vec[sma_vec.len()-1].sma_value + && lr_vec[lr_vec.len()-2].lr_value >= sma_vec[sma_vec.len()-2].sma_value { values.closetime = current_info.1;