Merge pull request #499 from austin362667/strategy/bollmaker

strategy: add bollmaker futures support
This commit is contained in:
Yo-An Lin 2022-04-07 10:11:41 +08:00 committed by GitHub
commit 6c20ec3c85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 15 deletions

View File

@ -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:

View File

@ -326,6 +326,7 @@ func (s *Strategy) placeOrders(ctx context.Context, orderExecutor bbgo.OrderExec
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,
@ -335,6 +336,7 @@ func (s *Strategy) placeOrders(ctx context.Context, orderExecutor bbgo.OrderExec
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