From c2eec1e72bed426326c60de5e23cd3cd4e6c838c Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 7 Sep 2022 00:50:54 +0800 Subject: [PATCH] bbgo: move fixedpoint one const to consts.go --- pkg/bbgo/consts.go | 5 +++++ pkg/bbgo/exit_protective_stop_loss.go | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 pkg/bbgo/consts.go diff --git a/pkg/bbgo/consts.go b/pkg/bbgo/consts.go new file mode 100644 index 000000000..5a627b94b --- /dev/null +++ b/pkg/bbgo/consts.go @@ -0,0 +1,5 @@ +package bbgo + +import "github.com/c9s/bbgo/pkg/fixedpoint" + +var one = fixedpoint.One diff --git a/pkg/bbgo/exit_protective_stop_loss.go b/pkg/bbgo/exit_protective_stop_loss.go index 6b3a064d5..fbba25768 100644 --- a/pkg/bbgo/exit_protective_stop_loss.go +++ b/pkg/bbgo/exit_protective_stop_loss.go @@ -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})