diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index 1273ca9..e7750fa 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -400,7 +400,7 @@ pub async fn list_up_for_sell(all_data: &AllData, futures_exchange_info_map: &Ha // is_sell = true; // } else - if element.pure_profit_percent.is_sign_positive() && lr_vec.last().unwrap().r_squared >= 0.85 { + if element.pure_profit_percent.is_sign_positive() && lr_vec[lr_vec.len()-2].r_squared >= 0.60 { is_sell = true; } else if server_epoch - element.close_time > 900_000 && lr_vec[lr_vec.len()-1].lr_value < lr_vec[lr_vec.len()-2].lr_value { diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index 0b77780..8a920c0 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -405,7 +405,7 @@ pub async fn list_up_for_sell(all_data: &AllData, futures_exchange_info_map: &Ha // } else if element.pure_profit_percent <= element.stoploss_percent { // is_sell = true; // } else - if element.pure_profit_percent.is_sign_positive() && lr_vec.last().unwrap().r_squared >= 0.85 { + if element.pure_profit_percent.is_sign_positive() && lr_vec[lr_vec.len()-2].r_squared >= 0.60 { is_sell = true; } else if server_epoch - element.close_time > 900_000 && lr_vec[lr_vec.len()-1].lr_value > lr_vec[lr_vec.len()-2].lr_value {