backtest: adjust best bid/ask price with tick size

This commit is contained in:
c9s 2023-06-12 16:01:40 +08:00
parent fded41b0ea
commit 0482ade44a
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -270,8 +270,8 @@ func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticke
Open: kline.Open,
High: kline.High,
Low: kline.Low,
Buy: kline.Close,
Sell: kline.Close,
Buy: kline.Close.Sub(matching.Market.TickSize),
Sell: kline.Close.Add(matching.Market.TickSize),
}, nil
}