PINE LIBRARY
업데이트됨 KernelFunctionsFilters

Library "KernelFunctionsFilters"
This library provides filters for non-repainting kernel functions for Nadaraya-Watson estimator implementations made by @jdehorty. Filters include a smoothing formula and zero lag formula. You can find examples in the code. For more information check out the original library KernelFunctions.
rationalQuadratic(_src, _lookback, _relativeWeight, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_relativeWeight (simple float)
startAtBar (simple int)
_filter (simple string)
gaussian(_src, _lookback, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
startAtBar (simple int)
_filter (simple string)
periodic(_src, _lookback, _period, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_period (simple int)
startAtBar (simple int)
_filter (simple string)
locallyPeriodic(_src, _lookback, _period, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_period (simple int)
startAtBar (simple int)
_filter (simple string)
j(line1, line2)
Parameters:
line1 (float)
line2 (float)
This library provides filters for non-repainting kernel functions for Nadaraya-Watson estimator implementations made by @jdehorty. Filters include a smoothing formula and zero lag formula. You can find examples in the code. For more information check out the original library KernelFunctions.
rationalQuadratic(_src, _lookback, _relativeWeight, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_relativeWeight (simple float)
startAtBar (simple int)
_filter (simple string)
gaussian(_src, _lookback, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
startAtBar (simple int)
_filter (simple string)
periodic(_src, _lookback, _period, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_period (simple int)
startAtBar (simple int)
_filter (simple string)
locallyPeriodic(_src, _lookback, _period, startAtBar, _filter)
Parameters:
_src (float)
_lookback (simple int)
_period (simple int)
startAtBar (simple int)
_filter (simple string)
j(line1, line2)
Parameters:
line1 (float)
line2 (float)
릴리즈 노트
v2Examples of usage:
line1 = rationalQuadratic(close, 8, 1, 25,"No Filter")
line2 = gaussian(close, 16, 25,"Smooth")
line3 = periodic(close, 8, 100, 25,"Zero Lag")
Updated:
rationalQuadratic(_src, _lookback, _relativeWeight, startAtBar, _filter)
Rational Quadratic Kernel - An infinite sum of Gaussian Kernels of different length scales.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_relativeWeight (simple float): <simple float> Relative weighting of time frames. Smaller values resut in a more stretched out curve and larger values will result in a more wiggly curve. 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.
startAtBar (simple int): <simple int> Bar index on which to start regression. The first bars of a chart are often highly volatile, and omission of these initial bars often leads to a better overall fit.
_filter (simple string): <simple string> The filter used on formula. Choice of "No Filter", "Smooth" and "Zero Lag"
Returns: lineout <float series> The estimated values according to the Rational Quadratic Kernel.
gaussian(_src, _lookback, startAtBar, _filter)
Gaussian Kernel - A weighted average of the source series. The weights are determined by the Radial Basis Function (RBF).
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
startAtBar (simple int): <simple int> Bar index on which to start regression. The first bars of a chart are often highly volatile, and omission of these initial bars often leads to a better overall fit.
_filter (simple string): <simple string> The filter used on formula. Choice of "No Filter", "Smooth" and "Zero Lag"
Returns: lineout <float series> The estimated values according to the Gaussian Kernel.
periodic(_src, _lookback, _period, startAtBar, _filter)
Periodic Kernel - The periodic kernel (derived by David Mackay) allows one to model functions which repeat themselves exactly.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_period (simple int): <simple int> The distance between repititions of the function.
startAtBar (simple int): <simple int> Bar index on which to start regression. The first bars of a chart are often highly volatile, and omission of these initial bars often leads to a better overall fit.
_filter (simple string): <simple string> The filter used on formula. Choice of "No Filter", "Smooth" and "Zero Lag"
Returns: lineout <float series> The estimated values according to the Periodic Kernel.
locallyPeriodic(_src, _lookback, _period, startAtBar, _filter)
Locally Periodic Kernel - The locally periodic kernel is a periodic function that slowly varies with time. It is the product of the Periodic Kernel and the Gaussian Kernel.
Parameters:
_src (float): <float series> The source series.
_lookback (simple int): <simple int> The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_period (simple int): <simple int> The distance between repititions of the function.
startAtBar (simple int): <simple int> Bar index on which to start regression. The first bars of a chart are often highly volatile, and omission of these initial bars often leads to a better overall fit.
_filter (simple string): <simple string> The filter used on formula. Choice of "No Filter", "Smooth" and "Zero Lag"
Returns: lineout <float series> The estimated values according to the Locally Periodic Kernel.
j(line1, line2)
J Line - Calculates the J line from K and D lines.
Parameters:
line1 (float): <float> Source 1 (K)
line2 (float): <float> Source 2 (D)
Returns: j <float series> The value of J
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.