Untitled
"TASC 2024.04 The Ultimate Smoother" by PineCodersTASC, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: TASC 2024.04 The Ultimate Smoother (v1.0), read 2026-10-12T15:52:05.406Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
TASC 2024.04 The Ultimate Smoother by PineCodersTASC, ported from Pine v5. Overlay indicator with 1 plot and 2 inputs.
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © PineCodersTASC
// TASC Issue: April 2024 - Vol. 42, Issue 4
// Article: The Ultimate Smoother.
// Smoothing data with less lag.
// Article By: John F. Ehlers
// Language: Pine-compatible v5
// Provided By: PineCoders, for tradingview.com
// ------------------------------------------------------------------------------------------------
// Original author: PineCodersTASC
// Original title: TASC 2024.04 The Ultimate Smoother
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 5
// Fetched: 2026-10-12
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
string title = 'TASC 2024.04 The Ultimate Smoother'
string stitle = 'US'
indicator(title, stitle, true)
// --- Inputs ---
int periodInput = input.int(20, "Critical Period:")
float sourceInput = input.source(close, "Source Series:")
// --- Functions ---
// @function The UltimateSmoother is a filter created
// by subtracting the response of a high-pass
// filter from that of an all-pass filter.
// @param src Source series.
// @param period Critical period.
// @returns Smoothed series.
UltimateSmoother(float src, int period) =>
float a1 = math.exp(-1.414 * math.pi / period)
float c2 = 2.0 * a1 * math.cos(1.414 * math.pi / period)
float c3 = -a1 * a1
float c1 = (1.0 + c2 - c3) / 4.0
float us = src
if bar_index >= 4
us := (1.0 - c1) * src + (2.0 * c1 - c2) * src[1] - (c1 + c3) * src[2] + c2 * nz(us[1]) + c3 * nz(us[2])
us
// --- Plotting ---
plot(UltimateSmoother(sourceInput, periodInput), 'US', color.blue, 2)
This file is under the Mozilla Public License 2.0; it is a port of the original by PineCodersTASC, with the original licence header kept and the changes made for FloScript noted in the file.
- v2
Library refresh 2026-10-14
- v1
Library refresh 2026-10-12
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.