TASC 2022.09 LRAdj EMA
"TASC 2022.09 LRAdj EMA" by PineCodersTASC, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: TASC 2022.09 LRAdj EMA (v1.0), read 2026-11-15T18:33:15.020Z; 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 2022.09 LRAdj EMA by PineCodersTASC, ported from Pine v5. Overlay indicator with 1 plot 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/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2022-08-16; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
// TASC Issue: September 2022 - Vol. 40, Issue 10
// Article: The Linear Regression-Adjusted
// Exponential Moving Average - The LRAdj EMA
// Article By: Vitali Apirine
// Language: Pine-compatible v5
// Provided By: PineCoders, for tradingview.com
// ------------------------------------------------------------------------------------------------
// Original author: PineCodersTASC
// Original title: TASC 2022.09 LRAdj EMA
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 5
// Fetched: 2026-11-15
// 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
indicator('TASC 2022.09 LRAdj EMA', "LRAdj EMA", overlay=true)
int Periods = input.int(50, 'EMA Length:')
int Pds = input.int(50, 'LR Lookback Period:')
float Mltp = input.float(5.0, 'Multiplier:')
LRAdjEMA(float source = close, int Periods = 10, int Pds = 10, float Mltp = 3.0) =>
int pds = math.max(1, Pds)
float Mltp1 = 2.0 / math.max(1, Periods + 1.0)
float LR = ta.linreg(source, pds, 0)
float Dist = math.abs(LR - source)
float LLV = ta.lowest(Dist, pds)
float HHV = ta.highest(Dist, pds)
float LRAdj = (Dist - LLV) / nz(HHV - LLV, 1.0e-307)
float Mltp2 = LRAdj * Mltp
float Rate = Mltp1 * (1.0 + Mltp2)
float LRAdjma = na
if bar_index > math.max(Periods, pds)
float prev = nz(LRAdjma[1], source)
LRAdjma := prev + Rate * (source - prev)
LRAdjma
ma = LRAdjEMA(close, Periods, Pds, Mltp)
plot(ma, color=color.blue)
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.
- v1
Library refresh 2026-11-15
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.