diff --git a/src/strategy_team/future_strategy_long.rs b/src/strategy_team/future_strategy_long.rs index 64e0f3a..346c7ea 100644 --- a/src/strategy_team/future_strategy_long.rs +++ b/src/strategy_team/future_strategy_long.rs @@ -72,7 +72,7 @@ pub async fn list_up_for_buy( supertrend_1m_map.get(symbol), price_and_closetime, ) { - if supertrend_vec.last().unwrap().close_time > current_info.1 + if supertrend_vec.last().unwrap().close_time > server_epoch && supertrend_vec.last().unwrap().signal.as_ref().is_some_and(|a| *a == SuperTrendSignal::BUY) { values.current_price = current_info.0; diff --git a/src/strategy_team/future_strategy_short.rs b/src/strategy_team/future_strategy_short.rs index f6772c2..c10d567 100644 --- a/src/strategy_team/future_strategy_short.rs +++ b/src/strategy_team/future_strategy_short.rs @@ -72,7 +72,7 @@ pub async fn list_up_for_buy( supertrend_1m_map.get(symbol), price_and_closetime, ) { - if supertrend_vec.last().unwrap().close_time > current_info.1 + if supertrend_vec.last().unwrap().close_time > server_epoch && supertrend_vec.last().unwrap().signal.as_ref().is_some_and(|a| *a == SuperTrendSignal::SELL) { values.current_price = current_info.0;