qbtrade/pkg/indicator/v2/atr.go
2024-06-27 22:42:38 +08:00

13 lines
228 B
Go

package indicatorv2
type ATRStream struct {
// embedded struct
*RMAStream
}
func ATR2(source KLineSubscription, window int) *ATRStream {
tr := TR2(source)
rma := RMA2(tr, window, true)
return &ATRStream{RMAStream: rma}
}