From 67e57b49eb6e35afc99d3f95e988bda64acb0c22 Mon Sep 17 00:00:00 2001 From: zenix Date: Tue, 6 Sep 2022 14:43:05 +0900 Subject: [PATCH] fix: move sourceselector to bbgo folder --- pkg/{strategy => bbgo}/source.go | 2 +- pkg/strategy/drift/strategy.go | 3 +-- pkg/strategy/elliottwave/strategy.go | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) rename pkg/{strategy => bbgo}/source.go (98%) diff --git a/pkg/strategy/source.go b/pkg/bbgo/source.go similarity index 98% rename from pkg/strategy/source.go rename to pkg/bbgo/source.go index 433f0a6c2..27c0a5e8e 100644 --- a/pkg/strategy/source.go +++ b/pkg/bbgo/source.go @@ -1,4 +1,4 @@ -package strategy +package bbgo import ( "strings" diff --git a/pkg/strategy/drift/strategy.go b/pkg/strategy/drift/strategy.go index 00b2f4887..cb1b6a71d 100644 --- a/pkg/strategy/drift/strategy.go +++ b/pkg/strategy/drift/strategy.go @@ -19,7 +19,6 @@ import ( "github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/indicator" "github.com/c9s/bbgo/pkg/interact" - "github.com/c9s/bbgo/pkg/strategy" "github.com/c9s/bbgo/pkg/types" "github.com/c9s/bbgo/pkg/util" ) @@ -43,7 +42,7 @@ type Strategy struct { bbgo.StrategyController types.Market types.IntervalWindow - strategy.SourceSelector + bbgo.SourceSelector *bbgo.Environment *types.Position `persistence:"position"` diff --git a/pkg/strategy/elliottwave/strategy.go b/pkg/strategy/elliottwave/strategy.go index 3e9fb8d98..d8200409b 100644 --- a/pkg/strategy/elliottwave/strategy.go +++ b/pkg/strategy/elliottwave/strategy.go @@ -14,7 +14,6 @@ import ( "github.com/c9s/bbgo/pkg/datatype/floats" "github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/indicator" - "github.com/c9s/bbgo/pkg/strategy" "github.com/c9s/bbgo/pkg/types" "github.com/c9s/bbgo/pkg/util" "github.com/sirupsen/logrus" @@ -38,8 +37,8 @@ type Strategy struct { Symbol string `json:"symbol"` bbgo.StrategyController + bbgo.SourceSelector types.Market - strategy.SourceSelector Session *bbgo.ExchangeSession Interval types.Interval `json:"interval"`