Update filtering
This commit is contained in:
parent
8322623878
commit
51ad971321
|
|
@ -91,7 +91,7 @@ pub async fn list_up_for_buy(
|
||||||
values.current_price = current_price;
|
values.current_price = current_price;
|
||||||
values.closetime = rt_price_vec.last().unwrap().close_time;
|
values.closetime = rt_price_vec.last().unwrap().close_time;
|
||||||
values.stoploss = band_value;
|
values.stoploss = band_value;
|
||||||
values.target_price = decimal_add(decimal_mul(decimal_sub(current_price, values.stoploss), dec!(4.0)), current_price);
|
values.target_price = decimal_add(decimal_mul(decimal_sub(current_price, values.stoploss), dec!(3.0)), current_price);
|
||||||
} else if supertrend_vec.last().unwrap().area == SuperTrendArea::DOWN &&
|
} else if supertrend_vec.last().unwrap().area == SuperTrendArea::DOWN &&
|
||||||
band_value > current_price &&
|
band_value > current_price &&
|
||||||
band_value > open_price
|
band_value > open_price
|
||||||
|
|
@ -99,7 +99,7 @@ pub async fn list_up_for_buy(
|
||||||
values.current_price = current_price;
|
values.current_price = current_price;
|
||||||
values.closetime = rt_price_vec.last().unwrap().close_time;
|
values.closetime = rt_price_vec.last().unwrap().close_time;
|
||||||
values.stoploss = decimal_sub(open_price, decimal_sub(band_value, open_price));
|
values.stoploss = decimal_sub(open_price, decimal_sub(band_value, open_price));
|
||||||
values.target_price = decimal_add(decimal_mul(decimal_sub(open_price, values.stoploss), dec!(4.0)), current_price);
|
values.target_price = decimal_add(decimal_mul(decimal_sub(open_price, values.stoploss), dec!(3.0)), current_price);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
keys_to_remove.insert(symbol.clone());
|
keys_to_remove.insert(symbol.clone());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user