mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
bbgo: Add ClosePosition doc comment
This commit is contained in:
parent
c484c1f176
commit
6c22c3799e
|
@ -248,6 +248,9 @@ func (e *GeneralOrderExecutor) GracefulCancel(ctx context.Context) error {
|
|||
return e.GracefulCancelActiveOrderBook(ctx, e.activeMakerOrders)
|
||||
}
|
||||
|
||||
// ClosePosition closes the current position by a percentage.
|
||||
// percentage 0.1 means close 10% position
|
||||
// tag is the order tag you want to attach, you may pass multiple tags, the tags will be combined into one tag string by commas.
|
||||
func (e *GeneralOrderExecutor) ClosePosition(ctx context.Context, percentage fixedpoint.Value, tags ...string) error {
|
||||
submitOrder := e.position.NewMarketCloseOrder(percentage)
|
||||
if submitOrder == nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user