indicator: simplify ATR2

This commit is contained in:
c9s 2023-05-30 13:53:59 +08:00
parent ebf9c43cd5
commit 266016a278
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -6,8 +6,7 @@ type ATRStream struct {
}
func ATR2(source KLineSubscription, window int) *ATRStream {
s := &ATRStream{}
tr := TR2(source)
s.RMAStream = RMA2(tr, window, true)
return s
rma := RMA2(tr, window, true)
return &ATRStream{RMAStream: rma}
}