filters update

This commit is contained in:
Miha Kralj
2026-02-23 17:27:35 -08:00
parent 7253f61299
commit 467a8c1cef
239 changed files with 17880 additions and 6329 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ indicator("TRIM: Trimmed Mean Moving Average", shorttitle="TRIM", overlay=true)
// @param period Window length. Must be >= 3.
// @param trimPct Percentage of values to trim from each tail (0-49). Default 10.
// @returns The trimmed mean value.
export trim(series float src, simple int period, simple int trimPct) =>
trim(series float src, simple int period, simple int trimPct) =>
// Number of values to discard from each end
int trimCount = math.max(int(period * trimPct / 100.0), 0)
int keepCount = period - 2 * trimCount