From 8ec2581dcf93d4c06c1ec3e11a9e518b3bdab7b3 Mon Sep 17 00:00:00 2001 From: Aleksei Ilin Date: Wed, 9 Sep 2026 06:55:12 +0200 Subject: [PATCH] fix: divide BBI by actual number of calc params --- src/extension/indicator/bullAndBearIndex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension/indicator/bullAndBearIndex.ts b/src/extension/indicator/bullAndBearIndex.ts index e140ec4a8..dd3f5c163 100644 --- a/src/extension/indicator/bullAndBearIndex.ts +++ b/src/extension/indicator/bullAndBearIndex.ts @@ -50,7 +50,7 @@ const bullAndBearIndex: IndicatorTemplate = { mas.forEach((ma) => { maSum += ma }) - bbi.bbi = maSum / 4 + bbi.bbi = params.length > 0 ? maSum / params.length : 0 } return bbi })