bbgo_origin/pkg/indicator/v2/atr.go

13 lines
228 B
Go
Raw Permalink Normal View History

2023-07-10 08:54:22 +00:00
package indicatorv2
2023-05-30 03:35:24 +00:00
type ATRStream struct {
2023-05-30 04:29:50 +00:00
// embedded struct
*RMAStream
2023-05-30 03:35:24 +00:00
}
func ATR2(source KLineSubscription, window int) *ATRStream {
tr := TR2(source)
2023-05-30 05:53:59 +00:00
rma := RMA2(tr, window, true)
return &ATRStream{RMAStream: rma}
2023-05-30 03:35:24 +00:00
}