mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
xmaker: adjust minimal quantity and minimal notional threshold
This commit is contained in:
parent
7e9b768e4c
commit
471a1b2baa
|
@ -497,12 +497,12 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) {
|
|||
// truncate quantity for the supported precision
|
||||
quantity = s.sourceMarket.TruncateQuantity(quantity)
|
||||
|
||||
if notional.Float64() <= s.sourceMarket.MinNotional {
|
||||
if notional.Float64() <= s.sourceMarket.MinNotional * 1.02 {
|
||||
s.Notifiability.Notify("The adjusted amount %f is less than minimal notional %f, skipping hedge", notional.Float64(), s.sourceMarket.MinNotional)
|
||||
return
|
||||
}
|
||||
|
||||
if quantity.Float64() <= s.sourceMarket.MinQuantity {
|
||||
if quantity.Float64() <= s.sourceMarket.MinQuantity * 1.02 {
|
||||
s.Notifiability.Notify("The adjusted quantity %f is less than minimal quantity %f, skipping hedge", quantity.Float64(), s.sourceMarket.MinQuantity)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user