mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
reformat scale.go
This commit is contained in:
parent
c5eb6483a5
commit
40fded70b2
|
@ -238,7 +238,6 @@ func (rule *SlideRule) Scale() (Scale, error) {
|
|||
return nil, errors.New("no any scale is defined")
|
||||
}
|
||||
|
||||
|
||||
// PriceVolumeScale defines the scale DSL for strategy, e.g.,
|
||||
//
|
||||
// scaleQuantity:
|
||||
|
@ -282,7 +281,7 @@ func (q *PriceVolumeScale) ScaleByPrice(price float64) (float64, error) {
|
|||
return 0, err
|
||||
}
|
||||
|
||||
if err := scale.Solve() ; err != nil {
|
||||
if err := scale.Solve(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
@ -300,7 +299,7 @@ func (q *PriceVolumeScale) ScaleByVolume(volume float64) (float64, error) {
|
|||
return 0, err
|
||||
}
|
||||
|
||||
if err := scale.Solve() ; err != nil {
|
||||
if err := scale.Solve(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user