turtle

package
v0.14.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Exchange hs.ExchangeConf
	Mongo    hs.MongoConf
	Strategy RestTurtleStrategyConf
	Robots   []hs.BroadcastConf
}

type RestTurtleStrategyConf

type RestTurtleStrategyConf struct {
	Total       float64
	Interval    string
	MaxPosition float64 `json:"maxPosition"` // max total can buy for one time
	MaxTimes    int     `json:"maxTimes"`    // max times for buy

	PeriodATR   int `json:"periodATR"`   //periodATR   = 14
	PeriodUpper int `json:"periodUpper"` //periodUpper = 20
	PeriodLower int `json:"periodLower"` //periodLower = 10
}

type Trader

type Trader struct {
	// contains filtered or unexported fields
}

func New

func New(configFilename string) *Trader

func (*Trader) Clear added in v0.11.5

func (t *Trader) Clear(ctx context.Context) error

func (*Trader) Close

func (t *Trader) Close(ctx context.Context)

func (*Trader) Init

func (t *Trader) Init(ctx context.Context)

func (*Trader) Print

func (t *Trader) Print(ctx context.Context) error

func (*Trader) Start

func (t *Trader) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL