Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "bollgrid"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strategy ¶
type Strategy struct { // OrderExecutor is an interface for submitting order. // This field will be injected automatically since it's a single exchange strategy. bbgo.OrderExecutor // MarketDataStore is a pointer only injection field. public trades, k-lines (candlestick) // and order book updates are maintained in the market data store. // This field will be injected automatically since we defined the Symbol field. *bbgo.MarketDataStore // StandardIndicatorSet contains the standard indicators of a market (symbol) // This field will be injected automatically since we defined the Symbol field. *bbgo.StandardIndicatorSet // 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 // These fields will be filled from the config file (it translates YAML to JSON) Symbol string `json:"symbol"` // Interval is the interval used by the BOLLINGER indicator (which uses K-Line as its source price) Interval types.Interval `json:"interval"` // RepostInterval is the interval for re-posting maker orders RepostInterval types.Interval `json:"repostInterval"` // GridPips is the pips of grid // e.g., 0.001, so that your orders will be submitted at price like 0.127, 0.128, 0.129, 0.130 GridPips fixedpoint.Value `json:"gridPips"` ProfitSpread fixedpoint.Value `json:"profitSpread"` // GridNum is the grid number, how many orders you want to post on the orderbook. GridNum int `json:"gridNumber"` // Quantity is the quantity you want to submit for each order. Quantity fixedpoint.Value `json:"quantity"` CancelProfitOrdersOnShutdown bool `json: "shutdownCancelProfitOrders"` // 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.