Change filtering method
This commit is contained in:
parent
9753aca93b
commit
572a07e662
|
|
@ -257,17 +257,7 @@ pub async fn list_up_for_buy(
|
||||||
supertrend_vec = supertrend_option_1d.unwrap();
|
supertrend_vec = supertrend_option_1d.unwrap();
|
||||||
|
|
||||||
if supertrend_vec.len() >= 3 {
|
if supertrend_vec.len() >= 3 {
|
||||||
let supertrend_search_result = supertrend_vec.binary_search_by_key(
|
if supertrend_vec.last().unwrap()
|
||||||
&element.closetime,
|
|
||||||
|SupertrendData {
|
|
||||||
band_value,
|
|
||||||
signal,
|
|
||||||
area,
|
|
||||||
close_time,
|
|
||||||
}| *close_time,
|
|
||||||
);
|
|
||||||
if supertrend_search_result.is_ok() {
|
|
||||||
if supertrend_vec[supertrend_search_result.unwrap()]
|
|
||||||
.area
|
.area
|
||||||
.contains("UP")
|
.contains("UP")
|
||||||
{
|
{
|
||||||
|
|
@ -284,7 +274,6 @@ pub async fn list_up_for_buy(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
try_join_all(task_vec).await?;
|
try_join_all(task_vec).await?;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user