bbgo: move fixedpoint one const to consts.go

This commit is contained in:
c9s 2022-09-07 00:50:54 +08:00
parent 62fb09c8d9
commit c2eec1e72b
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 5 additions and 2 deletions

5
pkg/bbgo/consts.go Normal file
View File

@ -0,0 +1,5 @@
package bbgo
import "github.com/c9s/bbgo/pkg/fixedpoint"
var one = fixedpoint.One

View File

@ -38,8 +38,6 @@ type ProtectiveStopLoss struct {
stopLossOrder *types.Order
}
var one = fixedpoint.One
func (s *ProtectiveStopLoss) Subscribe(session *ExchangeSession) {
// use 1m kline to handle roi stop
session.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: types.Interval1m})