mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pivotshort: fix find pivot func call
This commit is contained in:
parent
266016a278
commit
ba0102e992
|
@ -341,7 +341,7 @@ func (s *FailedBreakHigh) detectMacdDivergence() {
|
|||
var histogramPivots floats.Slice
|
||||
for i := pivotWindow; i > 0 && i < len(histogramValues); i++ {
|
||||
// find positive histogram and the top
|
||||
pivot, ok := floats.CalculatePivot(histogramValues[0:i], pivotWindow, pivotWindow, func(a, pivot float64) bool {
|
||||
pivot, ok := floats.FindPivot(histogramValues[0:i], pivotWindow, pivotWindow, func(a, pivot float64) bool {
|
||||
return pivot > 0 && pivot > a
|
||||
})
|
||||
if ok {
|
||||
|
|
Loading…
Reference in New Issue
Block a user