mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
Merge pull request #499 from austin362667/strategy/bollmaker
strategy: add bollmaker futures support
This commit is contained in:
commit
6c20ec3c85
|
@ -273,7 +273,7 @@ func toLocalFuturesOrderType(orderType types.OrderType) (futures.OrderType, erro
|
||||||
// case types.OrderTypeLimitMaker:
|
// case types.OrderTypeLimitMaker:
|
||||||
// return futures.OrderTypeLimitMaker, nil //TODO
|
// return futures.OrderTypeLimitMaker, nil //TODO
|
||||||
|
|
||||||
case types.OrderTypeLimit:
|
case types.OrderTypeLimit, types.OrderTypeLimitMaker:
|
||||||
return futures.OrderTypeLimit, nil
|
return futures.OrderTypeLimit, nil
|
||||||
|
|
||||||
// case types.OrderTypeStopLimit:
|
// case types.OrderTypeStopLimit:
|
||||||
|
|
|
@ -319,22 +319,24 @@ func (s *Strategy) placeOrders(ctx context.Context, orderExecutor bbgo.OrderExec
|
||||||
buyQuantity := s.QuantityOrAmount.CalculateQuantity(bidPrice)
|
buyQuantity := s.QuantityOrAmount.CalculateQuantity(bidPrice)
|
||||||
|
|
||||||
sellOrder := types.SubmitOrder{
|
sellOrder := types.SubmitOrder{
|
||||||
Symbol: s.Symbol,
|
Symbol: s.Symbol,
|
||||||
Side: types.SideTypeSell,
|
Side: types.SideTypeSell,
|
||||||
Type: types.OrderTypeLimitMaker,
|
Type: types.OrderTypeLimitMaker,
|
||||||
Quantity: sellQuantity,
|
Quantity: sellQuantity,
|
||||||
Price: askPrice,
|
Price: askPrice,
|
||||||
Market: s.Market,
|
Market: s.Market,
|
||||||
GroupID: s.groupID,
|
GroupID: s.groupID,
|
||||||
|
TimeInForce: types.TimeInForceGTC,
|
||||||
}
|
}
|
||||||
buyOrder := types.SubmitOrder{
|
buyOrder := types.SubmitOrder{
|
||||||
Symbol: s.Symbol,
|
Symbol: s.Symbol,
|
||||||
Side: types.SideTypeBuy,
|
Side: types.SideTypeBuy,
|
||||||
Type: types.OrderTypeLimitMaker,
|
Type: types.OrderTypeLimitMaker,
|
||||||
Quantity: buyQuantity,
|
Quantity: buyQuantity,
|
||||||
Price: bidPrice,
|
Price: bidPrice,
|
||||||
Market: s.Market,
|
Market: s.Market,
|
||||||
GroupID: s.groupID,
|
GroupID: s.groupID,
|
||||||
|
TimeInForce: types.TimeInForceGTC,
|
||||||
}
|
}
|
||||||
|
|
||||||
var submitOrders []types.SubmitOrder
|
var submitOrders []types.SubmitOrder
|
||||||
|
|
Loading…
Reference in New Issue
Block a user