indicator/v2/tr: use PushAndEmit instead of just EmitUpdate

This commit is contained in:
c9s 2023-09-26 20:42:54 +08:00
parent 9a7b70d367
commit 3b6e1e32a4
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -38,10 +38,12 @@ func (s *TRStream) calculateAndPush(high, low, cls float64) {
if trueRange < hc { if trueRange < hc {
trueRange = hc trueRange = hc
} }
if trueRange < lc { if trueRange < lc {
trueRange = lc trueRange = lc
} }
s.previousClose = cls s.previousClose = cls
s.EmitUpdate(trueRange)
s.PushAndEmit(trueRange)
} }