diff --git a/pkg/indicator/atr2.go b/pkg/indicator/atr2.go index f0cdc2c12..fac3e8e06 100644 --- a/pkg/indicator/atr2.go +++ b/pkg/indicator/atr2.go @@ -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} }