flashcrash

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: AGPL-3.0 Imports: 7 Imported by: 2

Documentation

Overview

flashcrash strategy tries to place the orders at 30%~50% of the current price, so that you can catch the orders while flashcrash happens

Index

Constants

View Source
const ID = "flashcrash"

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

type Strategy struct {
	// These fields will be filled from the config file (it translates YAML to JSON)
	// Symbol is the symbol of market you want to run this strategy
	Symbol string `json:"symbol"`

	// Interval is the interval used to trigger order updates
	Interval types.Interval `json:"interval"`

	// GridNum is the grid number, how many orders you want to places
	GridNum int `json:"gridNumber"`

	Percentage fixedpoint.Value `json:"percentage"`

	// BaseQuantity is the quantity you want to submit for each order.
	BaseQuantity fixedpoint.Value `json:"baseQuantity"`

	// Injection fields start
	// --------------------------
	// Market stores the configuration of the market, for example, VolumePrecision, PricePrecision, MinLotSize... etc
	// This field will be injected automatically since we defined the Symbol field.
	types.Market

	// StandardIndicatorSet contains the standard indicators of a market (symbol)
	// This field will be injected automatically since we defined the Symbol field.
	*bbgo.StandardIndicatorSet
	// contains filtered or unexported fields
}

func (*Strategy) ID added in v1.11.0

func (s *Strategy) ID() 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)

Jump to

Keyboard shortcuts

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