diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index b260262..82a694e 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -154,7 +154,8 @@ pub async fn list_up_for_sell(alldata: &AllData) -> Result<(), Box server_epoch - && stoch_rsis_vec.last().unwrap().k < stoch_rsis_vec.last().unwrap().d { + && stoch_rsis_vec[stoch_rsis.len()-1].k < stoch_rsis_vec[stoch_rsis.len()-1].d + && stoch_rsis_vec[stoch_rsis.len()-2].k > stoch_rsis_vec[stoch_rsis.len()-2].d { over_turned = true; } diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index 10f2a86..5ccf93a 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -153,7 +153,8 @@ pub async fn list_up_for_sell(alldata: &AllData) -> Result<(), Box server_epoch - && stoch_rsis_vec.last().unwrap().k > stoch_rsis_vec.last().unwrap().d { + && stoch_rsis_vec[stoch_rsis.len()-1].k > stoch_rsis_vec[stoch_rsis.len()-1].d + && stoch_rsis_vec[stoch_rsis.len()-2].k < stoch_rsis_vec[stoch_rsis.len()-2].d { over_turned = true; }