TradingView
QuantraSystems
28 de Dic. de 2023 20:02

Triple Confirmation Kernel Regression Base [QuantraAI] 

Bitcoin all time history indexINDEX

Descripción

Kernel Regression Oscillator - BASE


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.

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.




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 - This Indicator.
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.





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.


kernel(source, bandwidth, kernel_type) => switch kernel_type "Epanechnikov" => math.abs(source) <= 1 ? 0.75 * (1 - math.pow(source, 2)) : 0.0 "Logistic" => 1/math.exp(source + 2 + math.exp(-source)) "Wave" => math.abs(source) <= 1 ? (1 - math.abs(source)) * math.cos(math.pi * source) : 0. kernelRegression(src, bandwidth, kernel_type) => sumWeightedY = 0. sumKernels = 0. for i = 0 to bandwidth - 1 base = i*i/math.pow(bandwidth, 2) kernel = kernel(base, 1, kernel_type) sumWeightedY += kernel * src sumKernels += kernel (src - sumWeightedY/sumKernels)/src // Triple Confirmations Ep = kernelRegression(source, bandwidth, 'Epanechnikov' ) Lo = kernelRegression(source, bandwidth, 'Logistic' ) Wa = kernelRegression(source, bandwidth, 'Wave' )


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.
// Average AV = math.avg(Ep, Lo, Wa)


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.

Notas de prensa

Added custom alerts!
Alerts are based upon bar coloring and overbought/oversold (OB/OS) zones.

Notas de prensa

Added monochrome colors and the option for user-defined color themes.

Notas de prensa

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

Notas de prensa

Added 'Dynamic' capabilities.
Added 'Compressed Signal Mode'.

Notas de prensa

Updated Dynamic Function Library.
Updated header name tag.

Notas de prensa

Updated Title.
Comentarios
trade-with-code
This is a great work!
QuantraSystems
@trade-with-code, Thankyou so much!
I'm glad you like it!
Deltaquadrant
Outstanding code and outstanding person for putting up this as open source . Thank you very much and all the best for you.
QuantraSystems
@Deltaquadrant, Thankyou, I'm glad you appreciate it!
yfonticiella15
Excellent work, these indicators are the holy grail of trading!
QuantraSystems
@yfonticiella15, An incredible compliment, I am glad we have been able to help!
huenshan
Thanks for this wonderful indicator! I am still learning how to understand all of it, but was curious if you could explain why some charts show multiple overbought or oversold conditions on various time frames? Maybe I am not getting it so please go easy with any explanation you can provide. The only change I made to the default settings was changing the Bandwidth to 75. Here are a couple examples of what I'm talking about:



Thank you in advance!
Leandro_Scalize
@QuantraAI Great work!

What are your recommended setting for a mid-range like 1h time frame?

I’d appreciate your job here.
QuantraSystems
@Leandro_Scalize, Thank you for your kind words!
Due to the differing volatility levels between symbols, it is hard to give a definitive recommendation.

It can be noted, however, that on timeframes lower than 1D relative volatility will increase.
So, it would be prudent to increase the 'Bandwidth' parameter.

I have observed 75 to be a good starting point for the 1 hour, but please remember this indicator can be set up for different purposes (Mean-reversion or Trend-following, for example).
So adjust accordingly if required.

Do not hesitate to reach out if you have any further questions!
arunsinghd18
From where to get 𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮 on the Overlay on charts, pls share the link or is it paid strategy
Más