RedK Dual-Color Zero-Lag Moving Average
"RedK Dual-Color Zero-Lag Moving Average (RedK ZLMA v1)" by RedKTrader, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: RedK Dual-Color Zero-Lag Moving Average (RedK ZLMA v1) (v1.0), read 2026-10-12T16:18:47.772Z; source language v4.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
RedK Dual-Color Zero-Lag Moving Average (RedK ZLMA v1) by RedKTrader, ported from Pine v4. Overlay indicator with 1 plot, alerts and 3 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RedKTrader
// ------------------------------------------------------------------------------------------------
// Original author: RedKTrader
// Original title: RedK Dual-Color Zero-Lag Moving Average (RedK ZLMA v1)
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 4
// 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
// Converted by the FloScript converter from a Pine-compatible v4 source.
indicator("RedK Dual-Color Zero-Lag Moving Average", shorttitle="RedK ZLMA v1", precision=2, timeframe="", overlay=true)
price = input(title="Source", defval=close)
length = input.int(title="Length", defval=7, minval=1, step=1)
smooth = input.int(title="Smoothing", defval=3, minval=1, step=1)
// Calculations
priceMA = ta.wma(ta.wma(price, length), smooth)
ZLMA = 2 * priceMA - ta.wma(priceMA, length)
up = ta.change(ZLMA) > 0
dn = ta.change(ZLMA) < 0
zup = #2196f3
zdown = #f57f17
// Main Plot
plot(ZLMA, title="Zero Lag MA", color=up ? zup : zdown, linewidth=4)
// Alerts on ZLMA changing direction up or down
TurnUp = up and dn[1]
TurnDn = dn and up[1]
alertcondition(TurnUp, title="ZLMA Up!", message="Ribbon | Price Turning up! - {{exchange}}:{{ticker}} at {{close}}")
alertcondition(TurnDn, title="ZLMA Down!", message="Ribbon | Price Turning Down! - {{exchange}}:{{ticker}} at {{close}}")
This file is under the Mozilla Public License 2.0; it is a port of the original by RedKTrader, 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.