adjust flatness param

This commit is contained in:
c9s 2020-07-14 14:54:23 +08:00
parent acb0807a37
commit 9d828c99e2
2 changed files with 6 additions and 7 deletions

View File

@ -127,7 +127,7 @@ func (s *PrivateStream) Connect(ctx context.Context, eventC chan interface{}) er
func (s *PrivateStream) read(ctx context.Context, eventC chan interface{}) { func (s *PrivateStream) read(ctx context.Context, eventC chan interface{}) {
defer close(eventC) defer close(eventC)
ticker := time.NewTicker(30 * time.Minute) ticker := time.NewTicker(10 * time.Minute)
defer ticker.Stop() defer ticker.Stop()
for { for {

View File

@ -11,6 +11,11 @@ import (
"github.com/c9s/bbgo/pkg/bbgo/types" "github.com/c9s/bbgo/pkg/bbgo/types"
) )
type Strategy interface {
Init(trader *Trader) error
OnNewStream(stream *binance.PrivateStream) error
}
type Trader struct { type Trader struct {
Notifier *SlackNotifier Notifier *SlackNotifier
@ -22,12 +27,6 @@ type Trader struct {
reportTimer *time.Timer reportTimer *time.Timer
} }
type Strategy interface {
Init(trader *Trader) error
OnNewStream(stream *binance.PrivateStream) error
}
func (trader *Trader) RunStrategy(ctx context.Context, strategy Strategy) (chan struct{}, error) { func (trader *Trader) RunStrategy(ctx context.Context, strategy Strategy) (chan struct{}, error) {
symbol := trader.Context.Symbol symbol := trader.Context.Symbol