OPEN-SOURCE SCRIPT

Triple Confirmation Kernel Regression Overlay [QuantraSystems]

Updated
Kernel Regression Oscillator - Overlay


Introduction

The Kernel Regression Oscillator (ᏦᏒᎧ) represents an advanced tool for traders looking to capitalize on market trends.
This Indicator is valuable in identifying and confirming trend directions, as well as probabilistic and dynamic oversold and overbought zones.



It achieves this through a unique composite approach using three distinct Kernel Regressions combined in an Oscillator.
The additional Chart Overlay Indicator adds confidence to the signal.
Which is this Indicator.

This methodology helps the trader to significantly reduce false signals and offers a more reliable indication of market movements than more widely used indicators can.


snapshot

Legend

The upper section is the Overlay. It features the Signal Wave to display the current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 3), which can indicate extremely rare situations which can lead to either a softening momentum in the trend or even a mean reversion situation.

The lower one is the Base Chart.
The Indicator is linked here

It features the Kernel Regression Oscillator to display a composite of three distinct regressions, also displaying current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 2), which can indicate extremely rare situations.


snapshot


Case Study

To effectively utilize the ᏦᏒᎧ, traders should use both the additional Overlay and the Base
Chart at the same time. Then focus on capturing the confluence in signals, for example:

If the 𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮 on the Overlay and the ᏦᏒᎧ on the Base Chart both reside near the extreme of an Oversold zone the probability is higher than normal that momentum in trend may soften or the token may even experience a reversion soon.

If a bar is characterized by an Oversold Shading in both the Overlay and the Base Chart, then the probability is very high to experience a reversion soon.
In this case the trader may want to look for appropriate entries into a long position, as displayed here.

If a bar is characterized by an Overbought Shading in either Overlay or Base Chart, then the probability is high for momentum weakening or a mean reversion.
In this case the trade may have taken profit and closed his long position, as displayed here.

Please note that we always advise to find more confluence by additional indicators.



Recommended Settings

Swing Trading (1D chart)

Overlay
Bandwith: 45
Width: 2
SD Lookback: 150
SD Multiplier: 2
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2


Fast-paced, Scalping (4min chart)

Overlay
Bandwith: 75
Width: 2
SD Lookback: 150
SD Multiplier: 3
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2





Notes

  • The Kernel Regression Oscillator on the Base Chart is also sensitive to divergences if that is something you are keen on using.

  • For maximum confluence, it is recommended to use the indicator both as a chart overlay and in its Base Chart.
    Please pay attention to shaded areas with Standard Deviation settings of 2 or 3 at their outer borders, and consider action only with high confidence when both parts of the indicator align on the same signal.
  • This tool shows its best performance on timeframes lower than 4 hours.
  • Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
  • The trend following functionality is indicated through the "𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮" Line, with optional "Up" and "Down" arrows to denote trend directions only (toggle “Show Trend Signals”).




Methodology

The Kernel Regression Oscillator takes three distinct kernel regression functions,
used at similar weight, in order to calculate a balanced and smooth composite of the regressions. Part of it are:
  1. The Epanechnikov Kernel Regression: Known for its efficiency in smoothing data by assigning less weight to data points further away from the target point than closer data points, effectively reducing variance.
  2. The Wave Kernel Regression: Similarly assigning weight to the data points based on distance, it captures repetitive and thus wave-like patterns within the data to smoothen out and reduce the effect of underlying cyclical trends.
  3. The Logistic Kernel Regression: This uses the logistic function in order to assign weights by probability distribution on the distance between data points and target points. It thus avoids both bias and variance to a certain level.




By combining these regressions in an unbiased average, we follow our principle of achieving confluence for a signal or a decision, by stacking several edges to increase the probability that we are correct.


The Standard Deviation bands take defined parameters from the user, in this case sigma of ideally between 2 to 3,
to help the indicator detect extremely improbable conditions and thus take an inversely probable signal from it to forward to the user.

The parameter settings and also the visualizations allow for ample customizations by the trader. The indicator comes with default and recommended settings.



For questions or recommendations, please feel free to seek contact in the comments.


Release Notes
Improved Visualization - to prevent clashes between the bar coloring and the "Signal Wave."
Release Notes
Added the option to remove the Standard Deviation Band's shading.
Release Notes
Added custom alerts!
Alerts are based upon bar coloring and overbought/oversold (OB/OS) zones.
Release Notes
Added monochrome colors and the option for user-defined color themes.
Release Notes
Non-critical update:
Adjusted the 'Wave' kernel function to return positive weights only, ensuring more conventional kernel behavior.

source ≤ 1 changed to
source ≤ 0.5
Release Notes
Added an internal rescaling function - ensures a non-decimal tick size.
This fixes a bug where the indicator did not display correctly on symbols with extremely low nominal prices.
Release Notes
Added 'Dynamic' capabilities.
Release Notes
Updated Dynamic Function Library.
Updated header name tag.
Release Notes
Updated License.
License formatting shout out to RUBIX_BINARY
cryptomarketeducationalkernelregressionmeanreversionmulti-timeframeoverlayregressionsStandard Deviation (Volatility)Trend Analysistrendfollowing

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


No statements or claims aim to be financial advice,
neither are any signals from us or our indicators.


Want to learn Trading, Investing or system building?
Join the Community! 👇

discord.gg/FMZDM3bZ9T
Also on:

Disclaimer