mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
xmaker: improve pips
This commit is contained in:
parent
e997220321
commit
c8bf85f4e2
|
@ -396,7 +396,7 @@ func (s *Strategy) updateQuote(ctx context.Context, orderExecutionRouter bbgo.Or
|
|||
|
||||
bidPrice = bidPrice.MulFloat64(1.0 - bidMargin.Float64())
|
||||
if i > 0 && pips > 0 {
|
||||
bidPrice -= pips.MulFloat64(s.makerMarket.TickSize)
|
||||
bidPrice -= pips.MulFloat64(float64(i) * s.makerMarket.TickSize)
|
||||
}
|
||||
|
||||
if makerQuota.QuoteAsset.Lock(bidQuantity.Mul(bidPrice)) && hedgeQuota.BaseAsset.Lock(bidQuantity) {
|
||||
|
@ -445,7 +445,7 @@ func (s *Strategy) updateQuote(ctx context.Context, orderExecutionRouter bbgo.Or
|
|||
|
||||
askPrice = askPrice.MulFloat64(1.0 + askMargin.Float64())
|
||||
if i > 0 && pips > 0 {
|
||||
askPrice += pips.MulFloat64(s.makerMarket.TickSize)
|
||||
askPrice += pips.MulFloat64(float64(i) * s.makerMarket.TickSize)
|
||||
}
|
||||
|
||||
if makerQuota.BaseAsset.Lock(askQuantity) && hedgeQuota.QuoteAsset.Lock(askQuantity.Mul(askPrice)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user