From 08ef3cf59a98279f7c129136e877027d8b7dc1db Mon Sep 17 00:00:00 2001 From: Sik Yoon Date: Mon, 18 Dec 2023 02:36:51 +0900 Subject: [PATCH] Rollback strategist004 --- src/strategy_team/strategy_004.rs | 4 ++-- src/strategy_team/strategy_manager.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/strategy_team/strategy_004.rs b/src/strategy_team/strategy_004.rs index a09fa5b..95eb686 100644 --- a/src/strategy_team/strategy_004.rs +++ b/src/strategy_team/strategy_004.rs @@ -276,7 +276,7 @@ pub async fn list_up_for_buy( } try_join_all(task_vec).await?; - // 6th filtering: 0.5% <= the average amplitude of the latest 10 30m candles <= 1.5% + // 6th filtering: 0.5% <= the average amplitude of the latest 10 30m candles <= 1.0% let filtered_data_5th_c = filtered_data_5th_arc.lock().await.clone(); let mut filtered_data_6th: Vec = Vec::new(); let mut filtered_data_6th_arc: Arc>> = @@ -302,7 +302,7 @@ pub async fn list_up_for_buy( } average_amplitude /= 10.0; - if 0.005 <= average_amplitude && average_amplitude <= 0.015 { + if 0.005 <= average_amplitude && average_amplitude <= 0.01 { let mut filtered_data_6th_lock = filtered_data_6th_arc_c.lock().await; let mut filtered_data = FilteredData::new(); filtered_data.symbol = element.symbol.clone(); diff --git a/src/strategy_team/strategy_manager.rs b/src/strategy_team/strategy_manager.rs index 28c37b6..6b15a69 100644 --- a/src/strategy_team/strategy_manager.rs +++ b/src/strategy_team/strategy_manager.rs @@ -32,7 +32,7 @@ struct Record { pub async fn execute_list_up_for_buy( all_data: &AllData, ) -> Result<(), Box> { - // let mut task_vec = Vec::new(); + let mut task_vec = Vec::new(); // let all_data_c3 = all_data.clone(); let all_data_c4 = all_data.clone(); // strategist_001(all_data).await?; @@ -40,15 +40,15 @@ pub async fn execute_list_up_for_buy( // task_vec.push(tokio::spawn(async move { // crate::strategy_team::strategy_003::list_up_for_buy(all_data_c3).await; // })); - // task_vec.push(tokio::spawn(async move { - // crate::strategy_team::strategy_004::list_up_for_buy(all_data_c4).await; - // })); + task_vec.push(tokio::spawn(async move { + crate::strategy_team::strategy_004::list_up_for_buy(all_data_c4).await; + })); // strategist_004(all_data).await?; // strategist_005(all_data).await?; // strategist_006(all_data).await?; - crate::strategy_team::strategy_test::strategist_test(all_data_c4).await; + // crate::strategy_team::strategy_test::strategist_test(all_data_c4).await; - // try_join_all(task_vec).await?; + try_join_all(task_vec).await?; Ok(()) }