OPEN-SOURCE SCRIPT

KST Cross Switch

199
The Know Sure Thing (KST) oscillator is a powerful momentum indicator, but its constantly fluctuating lines can sometimes make it difficult to determine the definitive market state at a glance.

This script transforms the traditional KST indicator into a clean, 3-stage State Machine tracker. Instead of staring at curved lines, this indicator locks the current market condition into three absolute levels: 100 for Bullish, 0 for Bearish, and 50 for Neutral.

When a strong bullish crossover occurs, the indicator locks to 100 with a lime green background. When a bearish crossunder happens, it locks to 0 with a maroon red background.
The core feature of this script is the Neutral Zone Threshold. In choppy or consolidating markets, KST lines often cross back and forth repeatedly, causing false signals. To solve this, the script checks the absolute distance between the KST line and the Signal line. If they are too close and moving sideways within your defined threshold, the indicator automatically resets to 50 with a neutral yellow/grey background. This helps you avoid overtrading during low-volatility squeeze periods.

You can fully customize the four different Rate of Change (ROC) lengths and their moving averages, as well as the signal line length. The Neutral Zone Threshold can also be finely tuned depending on the asset and timeframe you are trading.

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

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน