Skip to content

Commit

Permalink
indicator/stoch: simplify CalculateAndUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jul 20, 2022
1 parent 86c1619 commit ea08a61
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/indicator/stoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,8 @@ func (inc *STOCH) CalculateAndUpdate(kLines []types.KLine) {
}

for _, k := range kLines {
if inc.EndTime != zeroTime && !k.EndTime.After(inc.EndTime) {
continue
}

inc.PushK(k)
}

inc.EmitUpdate(inc.LastK(), inc.LastD())
}

func (inc *STOCH) handleKLineWindowUpdate(interval types.Interval, window types.KLineWindow) {
Expand Down

0 comments on commit ea08a61

Please sign in to comment.