Fix calc bug of target_profit_percent
This commit is contained in:
parent
d05a8fb579
commit
e01e7ce6f4
|
|
@ -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 {
|
||||
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}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user