mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
backtest: adjust best bid/ask price with tick size
This commit is contained in:
parent
fded41b0ea
commit
0482ade44a
|
@ -270,8 +270,8 @@ func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticke
|
||||||
Open: kline.Open,
|
Open: kline.Open,
|
||||||
High: kline.High,
|
High: kline.High,
|
||||||
Low: kline.Low,
|
Low: kline.Low,
|
||||||
Buy: kline.Close,
|
Buy: kline.Close.Sub(matching.Market.TickSize),
|
||||||
Sell: kline.Close,
|
Sell: kline.Close.Add(matching.Market.TickSize),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user