Merge pull request #1217 from andycheng123/fix/hhllstop

FIX: log hhllStop higher high and lower low detection instead of notify
This commit is contained in:
Andy Cheng 2023-07-03 16:30:00 +08:00 committed by GitHub
commit 624489cf65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,10 +146,10 @@ func (s *HigherHighLowerLowStop) updateHighLowNumber(kline types.KLine) {
low := kline.GetLow() low := kline.GetLow()
if s.klines.GetHigh().Compare(high) < 0 { if s.klines.GetHigh().Compare(high) < 0 {
s.highLows = append(s.highLows, types.DirectionUp) s.highLows = append(s.highLows, types.DirectionUp)
Notify("[hhllStop] detected %s new higher high %f", s.Symbol, high.Float64()) log.Debugf("[hhllStop] detected %s new higher high %f", s.Symbol, high.Float64())
} else if s.klines.GetLow().Compare(low) > 0 { } else if s.klines.GetLow().Compare(low) > 0 {
s.highLows = append(s.highLows, types.DirectionDown) s.highLows = append(s.highLows, types.DirectionDown)
Notify("[hhllStop] detected %s new lower low %f", s.Symbol, low.Float64()) log.Debugf("[hhllStop] detected %s new lower low %f", s.Symbol, low.Float64())
} else { } else {
s.highLows = append(s.highLows, types.DirectionNone) s.highLows = append(s.highLows, types.DirectionNone)
} }