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 // Graceful shutdown function *bbgo.Graceful // contains filtered or unexported fields }
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)
Click to show internal directories.
Click to hide internal directories.