mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 09:15:15 +00:00
19 lines
534 B
Go
19 lines
534 B
Go
// Code generated by "callbackgen -type PositionRiskControl"; DO NOT EDIT.
|
|
|
|
package riskcontrol
|
|
|
|
import (
|
|
"github.com/c9s/bbgo/pkg/fixedpoint"
|
|
"github.com/c9s/bbgo/pkg/types"
|
|
)
|
|
|
|
func (p *PositionRiskControl) OnReleasePosition(cb func(quantity fixedpoint.Value, side types.SideType)) {
|
|
p.releasePositionCallbacks = append(p.releasePositionCallbacks, cb)
|
|
}
|
|
|
|
func (p *PositionRiskControl) EmitReleasePosition(quantity fixedpoint.Value, side types.SideType) {
|
|
for _, cb := range p.releasePositionCallbacks {
|
|
cb(quantity, side)
|
|
}
|
|
}
|