Skip to content

Commit

Permalink
Update boll.go
Browse files Browse the repository at this point in the history
  • Loading branch information
joeguo authored Jan 30, 2023
1 parent 3061874 commit facbc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion boll.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (this *Boll) dma(lines []Kline, ma float64) float64 {
for i := 0; i < s; i++ {
sum += (lines[i].Close - ma) * (lines[i].Close - ma)
}
return math.Sqrt(sum / float64(this.n))
return math.Sqrt(sum / float64(this.n-1))
}

func (this *Boll) Boll(lines []Kline) (mid []float64, up []float64, low []float64) {
Expand Down

0 comments on commit facbc01

Please sign in to comment.