mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
exits/hhllstop: add basic parameters
This commit is contained in:
parent
52b2ffebd1
commit
a8438f8f72
32
pkg/bbgo/hh_ll_stop.go
Normal file
32
pkg/bbgo/hh_ll_stop.go
Normal file
|
@ -0,0 +1,32 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type HigherHighLowerLowStopLoss struct {
|
||||
Symbol string `json:"symbol"`
|
||||
|
||||
Side types.SideType `json:"side"`
|
||||
|
||||
types.IntervalWindow
|
||||
|
||||
HighLowWindow int `json:"highLowWindow"`
|
||||
|
||||
MaxHighLow int `json:"maxHighLow"`
|
||||
|
||||
MinHighLow int `json:"minHighLow"`
|
||||
|
||||
// ActivationRatio is the trigger condition
|
||||
// When the price goes higher (lower for side buy) than this ratio, the stop will be activated.
|
||||
ActivationRatio fixedpoint.Value `json:"activationRatio"`
|
||||
|
||||
// DeactivationRatio is the kill condition
|
||||
// When the price goes higher (lower for short position) than this ratio, the stop will be deactivated.
|
||||
// You can use this to combine several exits
|
||||
DeactivationRatio fixedpoint.Value `json:"deactivationRatio"`
|
||||
|
||||
session *ExchangeSession
|
||||
orderExecutor *GeneralOrderExecutor
|
||||
}
|
Loading…
Reference in New Issue
Block a user