factorzoo

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const ID = "factorzoo"

Variables

This section is empty.

Functions

This section is empty.

Types

type IntervalWindowSetting

type IntervalWindowSetting struct {
	types.IntervalWindow
}

type Linear added in v1.39.0

type Linear struct {
	Symbol string
	Market types.Market `json:"-"`
	types.IntervalWindow

	// MarketOrder is the option to enable market order short.
	MarketOrder bool `json:"marketOrder"`

	Quantity     fixedpoint.Value      `json:"quantity"`
	StopEMARange fixedpoint.Value      `json:"stopEMARange"`
	StopEMA      *types.IntervalWindow `json:"stopEMA"`

	bbgo.QuantityOrAmount
	// contains filtered or unexported fields
}

func (*Linear) Bind added in v1.39.0

func (s *Linear) Bind(session *bbgo.ExchangeSession, orderExecutor *bbgo.GeneralOrderExecutor)

func (*Linear) ClosePosition added in v1.39.0

func (s *Linear) ClosePosition(ctx context.Context, percentage fixedpoint.Value) error

func (*Linear) Subscribe added in v1.39.0

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

type Strategy

type Strategy struct {
	Environment *bbgo.Environment
	Symbol      string `json:"symbol"`
	Market      types.Market

	types.IntervalWindow

	// persistence fields
	Position    *types.Position    `persistence:"position"`
	ProfitStats *types.ProfitStats `persistence:"profit_stats"`
	TradeStats  *types.TradeStats  `persistence:"trade_stats"`

	Linear *Linear `json:"linear"`

	ExitMethods bbgo.ExitMethodSet `json:"exits"`

	// StrategyController
	bbgo.StrategyController
	// contains filtered or unexported fields
}

func (*Strategy) ID

func (s *Strategy) ID() string

func (*Strategy) InstanceID added in v1.33.1

func (s *Strategy) InstanceID() string

func (*Strategy) Run

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

func (*Strategy) Subscribe

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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