mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
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:
commit
624489cf65
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user