OPEN-SOURCE SCRIPT

Kernel Switch

erdas0の投稿
アップデート済
The indicator uses different kernel regression functions and filters to analyze and smooth the price data. It incorporates various technical analysis features like moving averages, ATR-based channels, and the Kalman filter to generate buy and sell signals. The purpose of this indicator is to help traders identify trends, reversals, and potential trade entry and exit points.

Key Components and Functionalities:

Kernel and Filter Selection:
Kernel: Options include RationalQuadratic, Gaussian, Periodic, and LocallyPeriodic.
Filter: Options include No Filter, Smooth, and Zero Lag.
Source: The source data for the calculations (default is close).
Lookback Period: The lookback period for the kernel calculations.
Relative Weight: Used for RationalQuadratic kernel.
Start at Bar: The starting bar index for the calculations.
Period: Used for Periodic and LocallyPeriodic kernels.

Additional Calculations:
Multiplier: Option to apply a multiplier to the kernel output.
Smoothing: Option to apply EMA smoothing to the kernel output.
Kalman Filter: Option to apply a Kalman filter to the smoothed output.
ATR Length: The length of the ATR used for calculating upper and lower bands.

Kernel Regression:
The code uses a switch statement to select and apply the chosen kernel function with the specified parameters.

Kalman Filter:
A custom function to apply a Kalman filter to the kernel output, providing additional smoothing and trend estimation.

ATR-based Channels:
Upper and lower bands are calculated using the kernel output and ATR, adjusted by a multiplier.

Buy/Sell Signals:
Buy signals are generated when the kernel output crosses above its previous value.
Sell signals are generated when the kernel output crosses below its previous value.

Plotting:
The main kernel output is plotted with color changes based on its direction (green for up, red for down).
Upper and lower bands are plotted based on the ATR-adjusted kernel output.
Buy and sell signals are marked on the chart with labels.
Additional markers are plotted when the high crosses above the upper band and the low crosses below the lower band.

Usage:
This indicator is used to analyze and smooth price data using various kernel regression functions and filters. It helps traders identify trends and potential reversal points, providing visual signals for buy and sell opportunities. By incorporating ATR-based channels and the Kalman filter, the indicator offers additional insights into price movements and volatility. Traders can customize the parameters to fit their specific trading strategies and preferences.

Important Note:
This script is provided for educational and template purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
リリースノート
-Band calculation changed
-Added smoothing methods. (McGinley, EMA, SMA, RMA,HMA)
リリースノート
-Added new smooting method. (WMA)
Bands and Channelseducational

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項