Skip to content

Commit

Permalink
indicator/till: fix e1 check
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jul 20, 2022
1 parent 946fb96 commit 6e043ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/indicator/till.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (inc *TILL) Length() int {
var _ types.Series = &TILL{}

func (inc *TILL) PushK(k types.KLine) {
if inc.e1.EndTime != zeroTime && k.EndTime.Before(inc.e1.EndTime) {
if inc.e1 != nil && inc.e1.EndTime != zeroTime && k.EndTime.Before(inc.e1.EndTime) {
return
}

Expand Down

0 comments on commit 6e043ba

Please sign in to comment.