From facbc01405762ae5ff9a9280598c9920b05901a0 Mon Sep 17 00:00:00 2001 From: JoeGuo Date: Mon, 30 Jan 2023 12:53:42 +0800 Subject: [PATCH] Update boll.go --- boll.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boll.go b/boll.go index 8033f1c..9934110 100644 --- a/boll.go +++ b/boll.go @@ -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) {