veryfid

Kernel Regression Toolkit

This toolkit provides filters and extra functionality for non-repainting Nadaraya-Watson estimator implementations made by @jdehorty. For the sake of ease I have nicknamed it "kreg". Filters include a smoothing formula and zero lag formula. The purpose of this script is to help traders test, experiment and develop different regression lines. Regression lines are best used as trend lines and can be an invaluable asset for quickly locating first pullbacks and breaks of trends.
Other features include two J lines and a blend line. J lines are featured in tools like Stochastic KDJ. The formula uses the distance between K and D lines to make the J line. The blend line adds the ability to blend two lines together. This can be useful for several tasks including finding a center/median line between two lines or for blending in the characteristics of a different line. Default is set to 50 which is a 50% blend of the two lines. This can be increased and decreased to taste. This tool can be overlaid on the chart or on top of another indicator if you set the source. It can even be moved into its own window to create a unique oscillator based on whatever sources you feed it.

Below are the standard settings for the kernel estimation as documented by @jdehorty:
Lookback Window: The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars. Recommended range: 3-50

Weighting: Relative weighting of time frames. As this value approaches zero, the longer time frames will exert more influence on the estimation. As this value approaches infinity, the behavior of the Rational Quadratic Kernel will become identical to the Gaussian kernel. Recommended range: 0.25-25

Level: Bar index on which to start regression. Controls how tightly fit the kernel estimate is to the data. Smaller values are a tighter fit. Larger values are a looser fit. Recommended range: 2-25

Lag: Lag for crossover detection. Lower values result in earlier crossovers. Recommended range: 1-2

For more information on this technique refer to to the original open source indicator by @jdehorty located here:

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?