diff --git a/src/coex/order_team.rs b/src/coex/order_team.rs index efbc94f..bb67796 100644 --- a/src/coex/order_team.rs +++ b/src/coex/order_team.rs @@ -535,7 +535,12 @@ pub async fn monitoring_filled_buy_order( // let target_profit_percent = average_amplitude + (standard_deviation_amplitude * (average_ratio_amp_body)); let target_profit_percent = |multiplier: f64| -> f64 { - ((average_amplitude / 2.0) * multiplier) + (standard_deviation_amplitude * 2.0) // 2.0 sigma (recommand: 0.5 ~ 2.0(patient & greedy)) + if multiplier < 0.0 { + ((average_amplitude / 2.0) * multiplier) - (standard_deviation_amplitude * 2.0) // 2.0 sigma (recommand: 0.5 ~ 2.0(patient & greedy)) + } else { + ((average_amplitude / 2.0) * multiplier) + (standard_deviation_amplitude * 2.0) // 2.0 sigma (recommand: 0.5 ~ 2.0(patient & greedy)) + } + }; @@ -577,7 +582,7 @@ pub async fn monitoring_filled_buy_order( target_profit_percent(0.2) ); is_sell = true; - } else if server_epoch - element.close_time > 12_600_000 // 30min * 7 + } else if server_epoch - element.close_time > (1_800) * 10 // 30min * 10 { println!( "selling {} due to time up {:.3}",