bollpp

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "bollpp"

Variables

This section is empty.

Functions

This section is empty.

Types

type BollingerSetting

type BollingerSetting struct {
	types.IntervalWindow
	BandWidth float64 `json:"bandWidth"`
}

type State

type State struct {
	Position    *types.Position  `json:"position,omitempty"`
	ProfitStats bbgo.ProfitStats `json:"profitStats,omitempty"`
}

type Strategy

type Strategy struct {
	*bbgo.Graceful
	*bbgo.Notifiability
	*bbgo.Persistence

	StandardIndicatorSet *bbgo.StandardIndicatorSet

	Symbol    string           `json:"symbol"`
	Interval  types.Interval   `json:"interval"`
	Quantity  fixedpoint.Value `json:"quantity"`
	MinSpread fixedpoint.Value `json:"minSpread"`
	Spread    fixedpoint.Value `json:"spread"`

	DefaultBollinger *BollingerSetting `json:"defaultBollinger"`
	NeutralBollinger *BollingerSetting `json:"neutralBollinger"`
	// contains filtered or unexported fields
}

func (*Strategy) ID

func (s *Strategy) ID() string

func (*Strategy) LoadState

func (s *Strategy) LoadState() error

func (*Strategy) Run

func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error

func (*Strategy) SaveState

func (s *Strategy) SaveState() error

func (*Strategy) Subscribe

func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)

func (*Strategy) Validate

func (s *Strategy) Validate() error

Jump to

Keyboard shortcuts

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