Indicator · Pine Script v6 · Own pane

NET: Ehlers Noise Elimination Technology

by mihakralj

This indicator plots John Ehlers Noise Elimination Technology in a separate pane.

View on GitHub

GitHub stars99on the repository
Pine versionv6current
Lines of code58
Settings2inputs
LicenceApache-2.0
Last update4 weeks ago27 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

58 lines of Pine Script v6 from lib/filters/net/net.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

net.pine
// Licensed under the Apache License, Version 2.0
// © mihakralj
//@version=6
indicator("NET: Ehlers Noise Elimination Technology", "NET", overlay = false)

//@function Calculates Ehlers Noise Elimination Technology using Kendall Tau-a
//@param source Series to calculate NET from
//@param period Lookback window for Kendall correlation (>= 2)
//@returns Kendall tau coefficient [-1, +1]
//@optimized O(n²) pairwise concordance/discordance per bar

// ——— Inputs ———
int    p_period = input.int(14, "Period", minval = 2, maxval = 100,
                            tooltip = "Lookback window for Kendall tau. Larger = smoother but slower response.")
string p_source = input.string("Close", "Source",
                               options = ["Close", "HL2", "HLC3", "OHLC4", "Open", "High", "Low"])

// ——— Source selector ———
float src = switch p_source
    "Close" => close
    "HL2"   => hl2
    "HLC3"  => hlc3
    "OHLC4" => ohlc4
    "Open"  => open
    "High"  => high
    "Low"   => low

// ——— Noise Elimination Technology (Kendall Tau-a) ———
// Reference: John F. Ehlers, "Noise Elimination Technology" (TASC, December 2020)
//
// Algorithm:
//   Store last 'period' values: X[0]=current, X[1]=1 bar ago, ..., X[N-1]=oldest
//   For each pair (i, k) where i > k (i is older, k is newer):
//     Num -= Sign(X[i] - X[k])
//   Denom = 0.5 * period * (period - 1)
//   NET = Num / Denom
//
// When price is rising, newer values > older values → Sign(older-newer) < 0 → -Sign > 0 → NET positive
// When price is falling, newer values < older values → Sign(older-newer) > 0 → -Sign < 0 → NET negative
// Output bounded [-1, +1]: fraction of concordant minus discordant pairs

net(float source, int period) =>
    float num = 0.0
    for i = 1 to period - 1
        for k = 0 to i - 1
            num -= math.sign(source[i] - source[k])
    float denom = 0.5 * period * (period - 1)
    float result = denom > 0 ? num / denom : 0.0
    result

// ——— Compute ———
float filt = net(src, p_period)

// ——— Plot ———
hline(0, "Zero", color = color.gray, linestyle = hline.style_dotted)
hline(0.5, "+0.5", color = color.new(color.green, 70), linestyle = hline.style_dotted)
hline(-0.5, "-0.5", color = color.new(color.red, 70), linestyle = hline.style_dotted)
plot(filt, "NET", color = filt >= 0 ? color.green : color.red, linewidth = 2)

Overview

NET: Ehlers Noise Elimination Technology estimates Kendall tau-a over a rolling window by counting concordant and discordant price pairs, then divides that count by the number of pairs. The result stays between -1 and +1, turning positive when newer prices tend to exceed older ones and negative when they tend to fall below them. Period sets the lookback, and Source chooses the price series. The line is green above zero and red below it, with dotted guides at zero and plus or minus 0.5. It does not generate trade entries or exits.

Details

Published by

mihakralj on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Trend

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingcsharpdotnetpinescriptpythonquantitative-financesimdta-libtechnical-analysistechnical-indicators

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Periodint14p_period
SourcestringClosep_source
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Schaff Trend Cycle

by everget
948 stars

This indicator plots the Schaff Trend Cycle in a separate pane. It subtracts a slow exponential moving average from a fast one, applies a stochastic cycle twice, and smooths each result to form a 0–100 oscillator. Line color follows the slope, or the upper and

Indicator v4 Oscillators & momentumTrend
Updated 10 days ago · GPL-3.0 GitHub repository of Schaff Trend Cycle

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper

Beep Boop

by magic8bot
409 stars

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome

Indicator v4 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Beep Boop

[RS]Standardized Trend Map

by ricardosantos79
261 stars

Standardized Trend Map calculates series momentum relative to active price range across 40 distinct lookback periods ranging from 2 to 80 bars on an exponential moving average source. Each standardized calculation rounds to an integer values of -1, 0, or 1 to

Indicator v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of [RS]Standardized Trend Map

ADX Histogram

by harryguiacorn
219 stars

This indicator calculates and displays the Average Directional Index (ADX) as a column histogram in a separate pane. It evaluates market trend strength by calculating directional movement metrics based on specified smoothing and DI length inputs. When the ADX

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Histogram

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers