OPEN-SOURCE SCRIPT

Kernel Switch

ที่อัปเดต:
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 ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ