Updated

[blackcat] L2 Ehlers RSI with NET

4 310
Level: 2

Background

John F. Ehlers introuced RSI with Noise Elimination Technology (NET) in Dec, 2020.

Function

Many indicators produce more or less noisy output, resulting in false or delayed signals. Dr. Ehlers proposed “Noise Elimination Technology,” in Dec, 2020. He introduces using a Kendall correlation to reduce indicator noise and provide better clarification of the indicator direction. This approach attempts to reduce noise without using smoothing filters, which tend to introduce indicator lag and therefore, delayed decisions. With this script, I use his “MyRSI” indicator, which he introduced in his May 2018 article in S&C, by adding some Tradingview pine v4 code for the noise elimination technology. The indicator plots the MyRSI value as well as the value after applying NET to MyRSI. This de-noising technology uses the Kendall correlation of the indicator with a rising slope. Compared with a lowpass filter, this method does not delay the signals.

The technology appears to work well in this example for removing the noise. But note that the NET function is not meant as a replacement of a lowpass or smoothing filter; its output is always in the -1 to +1 range, so it can be used for de-noising oscillators, but not, for instance, to generate a smoothed version of the price curve.

Key Signal

NET --> Ehlers RSI with NET fast line
Trigger --> Ehlers RSI with NET slow line

Pros and Cons

100% John F. Ehlers definition translation, even variable names are the same. This help readers who would like to use pine to read his book.


Remarks

The 99th script for Blackcat1402 John F. Ehlers Week publication.


Readme

In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.

The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.

Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.

Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.

Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.

Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.

Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Release Notes
OVERVIEW This indicator implements an enhanced version of Ehlers RSI with NET functionality, providing visual and alert-based signals for potential trading opportunities.
FEATURES
• Calculates Ehlers RSI using price differences over specified periods
• Incorporates NET (Normalized Efficiency Trend) for additional signal confirmation
• Generates visual signals through colored fills and labels
• Provides customizable alert conditions for buy and sell signals
• Supports various price inputs including HL2 (High-Low midpoint)

HOW TO USE

Add the indicator to your chart
Adjust the following parameters in the Inputs tab: • Price: Select the desired price source (default: HL2) • RSILength: Set the period for RSI calculation (default: 14) • NETLength: Set the period for NET calculation (default: 14)
Monitor the indicator lines for trading signals
Enable alerts in the TradingView settings if desired
LIMITATIONS
• Requires sufficient historical data for accurate calculations
• Performance may vary depending on market conditions
• Results should be used in conjunction with other analysis tools

NOTES
• The indicator uses arrays for efficient calculation of Ehlers RSI and NET values
• Visual representation includes colored fills between NET and Trigger lines
• Labels appear automatically when buy/sell signals are generated
Release Notes
█ OVERVIEW

A rank-based trend read of an Ehlers modified RSI: NET, the Noise Elimination
Technology, collapses the oscillator into one number between -1 and +1 that
states how orderly its recent values have been, and a smoothed, biased copy of
it becomes the trigger for long and short crosses. V2 adds a position state
machine, ATR stop and target references, a status table, re-entry logic and a
full alert set.

█ CONCEPTS

• Modified RSI: a bounded momentum reading of the price source, scaled
between -1 and +1 instead of 0 to 100.
• NET: the rolling Kendall rank correlation of that reading. The score is +1
when the series rises without one inversion, -1 when it falls, and near
zero when the order is random. Amplitude does not count, only the order of
the values, which is why the line stays flat while the oscillator chops.
• Trigger: the previous NET value, damped by the smoothing weight and
shifted by the offset. NET crossing it is the momentum event.
• Governance: one position at a time, an optional cooldown, and exit
priority over an entry on the same bar.

█ HOW TO USE

1 — NET above the trigger means an orderly climb; the fill colour flips with
the relationship.
2 — E marks a long entry, S a short one. An opposite cross closes the open
position and reverses it in one step.
3 — Check the status table in the top right corner before acting on a cross.
4 — Set alerts to Once Per Bar Close.

Input parameters
• Price source, default hl2, and RSI length, default 14.
• NET length, default 14, range 2 to 100: the correlation window. Cost grows
with the square of this value.
• Trigger offset 0.05 and trigger smoothing 0.9: a larger offset filters
weak crosses.
• Signals: enable long and short, cooldown bars (0 keeps the original
behaviour, 3 to 5 cuts chop), exit priority, momentum-exhaustion exit at
the +0.6 and -0.6 levels.
• Risk: ATR length 14, stop 2.0 xATR, target 3.0 xATR, and a switch that
lets a price touch of those levels close the position.
• Re-entry, off by default: NET is anchored to its own extreme around the
exit bar and a break of that anchor re-opens the trade.
• Visuals: fill, markers, background tint, status table.

█ FEATURES

• Status table: position, NET, trigger, spread, signal price, stop and
target, ATR, bars since the last signal.
• ATR stop and target measured from the signal price, reported in the data
window and the table; the pane stays in NET scale.
• Optional momentum-exhaustion exit and optional re-entry, both wired into
the state machine.
• Six alertconditions: long entry, short entry, long exit, short exit,
re-entry long, re-entry short, plus one dynamic alert naming the reason of
an exit — signal, stop loss or take profit.
• No cross-timeframe calls, so nothing repaints by construction.

█ SIGNALS

• E, green label under NET: long entry. S, red label above NET: short entry.
• X, orange cross: exit on the opposite cross. SL and TP mark an exit taken
by the stop or the target.
• RL and RS, teal and maroon: re-entry after an exit, with the anchors drawn
as dotted circles.
• Green or red background tint while a position is open.

█ IMPLEMENTATION NOTES

The correlation runs on nested loops, the pair count is guarded against a zero
denominator, and signals are evaluated at bar close.

█ LIMITATIONS

• NET is a rank statistic: it measures order, not size, so a small orderly
move and a large one look identical.
• Choppy markets produce crosses both ways; use the cooldown and the offset.
• The window needs history, so the first bars are not meaningful.
• Stops and targets are references for your own order management: no orders
are placed and this is not a backtest.

█ NOTES

• V2 versus the previous version: the correlation buffer is sized from the
NET length instead of a fixed array, division is guarded, a flat RSI
window no longer collapses to zero, the trigger constants became inputs,
dead code is gone, and every signal passes through a state machine.
• Built on John F. Ehlers' modified RSI and his Noise Elimination Technology
published in the December 2020 issue of Stocks & Commodities.

═════════════════════════════════════════════════════════════════════════
Open source under the Mozilla Public License 2.0. Use, modify and re-publish
with attribution. Feedback is welcome in the comments below.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.