Update filtering

This commit is contained in:
Sik Yoon 2024-05-25 07:56:10 +09:00
parent 12d97c109a
commit 9c5a3f0a93
2 changed files with 8 additions and 8 deletions

View File

@ -106,10 +106,10 @@ pub async fn list_up_for_buy(
if let Some(heatmap_volume_vec) = heatmap_volumes.get(symbol) { if let Some(heatmap_volume_vec) = heatmap_volumes.get(symbol) {
if heatmap_volume_vec.len() > 100 if heatmap_volume_vec.len() > 100
&& heatmap_volume_vec.last().unwrap().close_time > server_epoch && heatmap_volume_vec.last().unwrap().close_time > server_epoch
&& ((heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::High) && (heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::High) || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::High) || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::High)) || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::High)
{ {
do_buy = true; do_buy = true;
} }

View File

@ -106,10 +106,10 @@ pub async fn list_up_for_buy(
if let Some(heatmap_volume_vec) = heatmap_volumes.get(symbol) { if let Some(heatmap_volume_vec) = heatmap_volumes.get(symbol) {
if heatmap_volume_vec.len() > 100 if heatmap_volume_vec.len() > 100
&& heatmap_volume_vec.last().unwrap().close_time > server_epoch && heatmap_volume_vec.last().unwrap().close_time > server_epoch
&& ((heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::High) && (heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec.last().unwrap().heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::High) || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-2].heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::High) || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-3].heatmap_level == HeatMapLevel::High
|| (heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::High)) || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::ExtraHigh || heatmap_volume_vec[heatmap_volume_vec.len()-4].heatmap_level == HeatMapLevel::High)
{ {
do_buy = true; do_buy = true;
} }