OPEN-SOURCE SCRIPT
RS of long term KST

Description
Relative Strength of KST (Know Sure Thing) momentum between a stock and a reference index (e.g., Intesa San Paolo vs. FTSEMIB).
This indicator computes the KST oscillator separately for the chart symbol and the comparative symbol, then plots the difference (stock KST minus index KST). A positive or rising value indicates the stock has stronger momentum than the benchmark.
Best used on weekly timeframes.
Features:
- Fully configurable KST parameters (ROC lengths, SMA smoothing, weights).
- Signal line (SMA of the RS of KST) for potential crossover signals.
- Zero line for reference.
Rising values or crossings above the signal line may suggest improving relative momentum.
What the Script Does
This indicator calculates the Relative Strength of the KST momentum oscillator between the current chart symbol (e.g., a stock) and a comparative symbol (default: FTSEMIB).
KST Calculation (Know Sure Thing oscillator, originally developed by Martin Pring), computes four Rate-of-Change (ROC) values with different lengths (10, 13, 15, 20 by default). Each ROC is smoothed with its own SMA. The four smoothed ROCs are weighted (weights 1, 2, 3, 4 by default) and summed to create the final KST value.
This is done separately for: The chart symbol → kst
The comparative symbol → kstSymbol
Relative Strength of KST res = kst - kstSymbol
This is a subtraction-based relative strength (difference) of the two KST values, not a ratio, as to avoid singularity (division by zero).
A rising line or value above zero means the stock’s momentum (KST) is stronger than the index’s momentum.
Plotting Plots the RS of KST as a blue line.
Overlays a gray SMA (default length 10) with cross style (acts as a signal line).
Horizontal line at zero for reference.
This is best used on weekly charts (as KST is typically a longer-term momentum indicator).
Relative Strength of KST (Know Sure Thing) momentum between a stock and a reference index (e.g., Intesa San Paolo vs. FTSEMIB).
This indicator computes the KST oscillator separately for the chart symbol and the comparative symbol, then plots the difference (stock KST minus index KST). A positive or rising value indicates the stock has stronger momentum than the benchmark.
Best used on weekly timeframes.
Features:
- Fully configurable KST parameters (ROC lengths, SMA smoothing, weights).
- Signal line (SMA of the RS of KST) for potential crossover signals.
- Zero line for reference.
Rising values or crossings above the signal line may suggest improving relative momentum.
What the Script Does
This indicator calculates the Relative Strength of the KST momentum oscillator between the current chart symbol (e.g., a stock) and a comparative symbol (default: FTSEMIB).
KST Calculation (Know Sure Thing oscillator, originally developed by Martin Pring), computes four Rate-of-Change (ROC) values with different lengths (10, 13, 15, 20 by default). Each ROC is smoothed with its own SMA. The four smoothed ROCs are weighted (weights 1, 2, 3, 4 by default) and summed to create the final KST value.
This is done separately for: The chart symbol → kst
The comparative symbol → kstSymbol
Relative Strength of KST res = kst - kstSymbol
This is a subtraction-based relative strength (difference) of the two KST values, not a ratio, as to avoid singularity (division by zero).
A rising line or value above zero means the stock’s momentum (KST) is stronger than the index’s momentum.
Plotting Plots the RS of KST as a blue line.
Overlays a gray SMA (default length 10) with cross style (acts as a signal line).
Horizontal line at zero for reference.
This is best used on weekly charts (as KST is typically a longer-term momentum indicator).
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。