indicator/till: add zero time check

This commit is contained in:
c9s 2022-07-21 01:22:28 +08:00
parent 2523c2261b
commit 0b9d6939f3
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -87,7 +87,7 @@ func (inc *TILL) Length() int {
var _ types.Series = &TILL{}
func (inc *TILL) PushK(k types.KLine) {
if k.EndTime.Before(inc.e1.EndTime) {
if inc.e1.EndTime != zeroTime && k.EndTime.Before(inc.e1.EndTime) {
return
}