mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
adjust flatness param
This commit is contained in:
parent
acb0807a37
commit
9d828c99e2
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user