mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 04:28:04 +00:00
fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
Deep review of all indicator categories verified .md headers against .cs WarmupPeriod, parameters, inputs, and outputs. Fixes include warmup corrections, parameter documentation, output type accuracy, and Pine Script alignment.
This commit is contained in:
@@ -10,8 +10,6 @@ indicator("Bollinger Band Width (BBW)", "BBW", overlay=false)
|
||||
//@returns BBW value representing the width between Bollinger Bands
|
||||
//@optimized for performance and dirty data
|
||||
bbw(series float source, simple int period, simple float multiplier) =>
|
||||
if period <= 0 or multiplier <= 0.0
|
||||
runtime.error("Period and multiplier must be greater than 0")
|
||||
var int p = math.max(1, period), var int head = 0, var int count = 0
|
||||
var array<float> buffer = array.new_float(p, na)
|
||||
var float sum = 0.0, var float sumSq = 0.0
|
||||
@@ -28,7 +26,7 @@ bbw(series float source, simple int period, simple float multiplier) =>
|
||||
head := (head + 1) % p
|
||||
float basis = nz(sum / count, source)
|
||||
float dev = count > 1 ? multiplier * math.sqrt(math.max(0.0, sumSq / count - basis * basis)) : 0.0
|
||||
2 * dev
|
||||
basis != 0.0 ? 2 * dev / basis : 0.0
|
||||
|
||||
// ---------- Main loop ----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user