diff --git a/src/strategy_team/strategy_006.rs b/src/strategy_team/strategy_006.rs index d161d9c..8b4b132 100644 --- a/src/strategy_team/strategy_006.rs +++ b/src/strategy_team/strategy_006.rs @@ -58,7 +58,7 @@ pub async fn list_up_for_buy( if stoch_rsis.contains_key(symbol) { let stoch_rsi_vec = stoch_rsis.get(symbol).unwrap(); let search_result = stoch_rsi_vec.iter().position(|x| x.close_time == values.closetime); - if search_result.is_some_and(|a| stoch_rsi_vec[a-3].k < 20.0 && + if stoch_rsi_vec.len() > 10 && search_result.is_some_and(|a| stoch_rsi_vec[a-3].k < 20.0 && stoch_rsi_vec[a-2].k < 15.0 && stoch_rsi_vec[a-1].k < 10.0 && stoch_rsi_vec[a-1].k < stoch_rsi_vec[a].k &&