bbgo_origin/pkg/indicator/v2_atr.go

13 lines
226 B
Go
Raw Normal View History

2023-05-30 03:35:24 +00:00
package indicator
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
}