feature/dynamic_exposure: undo move dynamic_exposure and dynamic_spread

This commit is contained in:
Andy Cheng 2022-12-15 17:25:56 +08:00
parent 754f8da5d4
commit 095eb9c134
3 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
package risk
package dynamicmetric
import (
"github.com/c9s/bbgo/pkg/bbgo"

View File

@ -1,4 +1,4 @@
package risk
package dynamicmetric
import (
"github.com/pkg/errors"

View File

@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/c9s/bbgo/pkg/dynamicmetric"
"github.com/c9s/bbgo/pkg/risk"
"sync"
"github.com/c9s/bbgo/pkg/indicator"
@ -98,7 +97,7 @@ type Strategy struct {
// DynamicSpread enables the automatic adjustment to bid and ask spread.
// Overrides Spread, BidSpread, and AskSpread
DynamicSpread risk.DynamicSpread `json:"dynamicSpread,omitempty"`
DynamicSpread dynamicmetric.DynamicSpread `json:"dynamicSpread,omitempty"`
// MaxExposurePosition is the maximum position you can hold
// 10 means you can hold 10 ETH long/short position by maximum
@ -106,7 +105,7 @@ type Strategy struct {
// DynamicExposure is used to define the exposure position range with the given percentage.
// When DynamicExposure is set, your MaxExposurePosition will be calculated dynamically
DynamicExposure risk.DynamicExposure `json:"dynamicExposure"`
DynamicExposure dynamicmetric.DynamicExposure `json:"dynamicExposure"`
bbgo.QuantityOrAmount