qbtrade/pkg/indicator/v2/atr.go

13 lines
228 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
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}
}