Update filtering
This commit is contained in:
parent
bc8b1f12d5
commit
e1f50efd79
|
|
@ -45,9 +45,9 @@ pub async fn list_up_for_buy(
|
|||
&& tema15_vec.last().unwrap().close_time > server_epoch
|
||||
&& tema30_vec.last().unwrap().close_time > server_epoch
|
||||
{
|
||||
if tema15_vec[tema15_vec.len()-1].tema_value > tema15_vec[tema15_vec.len()-2].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-1].tema_value > tema15_vec[tema15_vec.len()-3].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-2].tema_value < tema15_vec[tema15_vec.len()-3].tema_value {
|
||||
if tema15_vec[tema15_vec.len()-1].tema_value < tema15_vec[tema15_vec.len()-2].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-1].tema_value < tema15_vec[tema15_vec.len()-3].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-2].tema_value > tema15_vec[tema15_vec.len()-3].tema_value {
|
||||
values.closetime = current_info.1;
|
||||
values.current_price = current_info.0;
|
||||
do_buy = true;
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ pub async fn list_up_for_buy(
|
|||
&& tema15_vec.last().unwrap().close_time > server_epoch
|
||||
&& tema30_vec.last().unwrap().close_time > server_epoch
|
||||
{
|
||||
if tema15_vec[tema15_vec.len()-1].tema_value < tema15_vec[tema15_vec.len()-2].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-1].tema_value < tema15_vec[tema15_vec.len()-3].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-2].tema_value > tema15_vec[tema15_vec.len()-3].tema_value {
|
||||
if tema15_vec[tema15_vec.len()-1].tema_value > tema15_vec[tema15_vec.len()-2].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-1].tema_value > tema15_vec[tema15_vec.len()-3].tema_value
|
||||
&& tema15_vec[tema15_vec.len()-2].tema_value < tema15_vec[tema15_vec.len()-3].tema_value {
|
||||
values.closetime = current_info.1;
|
||||
values.current_price = current_info.0;
|
||||
do_buy = true;
|
||||
|
|
@ -174,9 +174,9 @@ pub async fn list_up_for_sell(alldata: &AllData) -> Result<(), Box<dyn std::erro
|
|||
// TODO: BNB 코인이 없으면
|
||||
|
||||
if !element.current_price.is_zero() {
|
||||
if element.pure_profit_percent >= 0.8 {
|
||||
if element.pure_profit_percent >= 0.5 {
|
||||
is_sell = true;
|
||||
} else if element.pure_profit_percent <= -0.8 {
|
||||
} else if element.pure_profit_percent <= -0.5 {
|
||||
is_sell = true;
|
||||
} else if server_epoch - element.transact_time >= (300_000) * 1 {
|
||||
// time up selling
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user