mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
pull out bollinger settings
This commit is contained in:
parent
b75da154a8
commit
5fe0f5a299
|
@ -36,11 +36,6 @@ func init() {
|
|||
bbgo.RegisterStrategy(ID, &Strategy{})
|
||||
}
|
||||
|
||||
type BollingerSetting struct {
|
||||
types.IntervalWindow
|
||||
BandWidth float64 `json:"bandWidth"`
|
||||
}
|
||||
|
||||
type Strategy struct {
|
||||
*bbgo.Graceful
|
||||
*bbgo.Notifiability
|
||||
|
@ -108,11 +103,11 @@ type Strategy struct {
|
|||
// NeutralBollinger is the smaller range of the bollinger band
|
||||
// If price is in this band, it usually means the price is oscillating.
|
||||
// If price goes out of this band, we tend to not place sell orders or buy orders
|
||||
NeutralBollinger *BollingerSetting `json:"neutralBollinger"`
|
||||
NeutralBollinger *types.BollingerSetting `json:"neutralBollinger"`
|
||||
|
||||
// DefaultBollinger is the wide range of the bollinger band
|
||||
// for controlling your exposure position
|
||||
DefaultBollinger *BollingerSetting `json:"defaultBollinger"`
|
||||
DefaultBollinger *types.BollingerSetting `json:"defaultBollinger"`
|
||||
|
||||
// DowntrendSkew is the order quantity skew for normal downtrend band.
|
||||
// The price is still in the default bollinger band.
|
||||
|
|
8
pkg/types/bollinger.go
Normal file
8
pkg/types/bollinger.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package types
|
||||
|
||||
// BollingerSetting contains the bollinger indicator setting propers
|
||||
// Interval, Window and BandWidth
|
||||
type BollingerSetting struct {
|
||||
IntervalWindow
|
||||
BandWidth float64 `json:"bandWidth"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user