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).
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.