mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
indicator/v2/tr: use PushAndEmit instead of just EmitUpdate
This commit is contained in:
parent
9a7b70d367
commit
3b6e1e32a4
|
@ -38,10 +38,12 @@ func (s *TRStream) calculateAndPush(high, low, cls float64) {
|
|||
if trueRange < hc {
|
||||
trueRange = hc
|
||||
}
|
||||
|
||||
if trueRange < lc {
|
||||
trueRange = lc
|
||||
}
|
||||
|
||||
s.previousClose = cls
|
||||
s.EmitUpdate(trueRange)
|
||||
|
||||
s.PushAndEmit(trueRange)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user