The SmoothedStochastic function, also known as the slow stochastic oscillator, is a technical analysis tool used to generate overbought or oversold signals in a price series. This function smooths out the results of the traditional stochastic oscillator to provide more reliable signals by reducing sensitivity and noise.
SmoothedStochastic[N,K](price)
Where N is the period over which the lows and highs are considered, and K is the smoothing factor applied to the %D line.
The Smoothed Stochastic is calculated using the following formula:
mySMI = SmoothedStochastic[14,3](close)
if(highest[14](mySMI) > mySMI) THEN
signal = 1
else
signal = 0
ENDIF
RETURN signal
This example calculates the Smoothed Stochastic value for the closing price over a 14-day period with a smoothing factor of 3. It then checks if the current value is less than the highest value of the past 14 days. If true, it sets a signal to 1 (indicating a potential sell), otherwise, it sets the signal to 0.
The Smoothed Stochastic oscillator is particularly useful in identifying divergences which can signal potential reversal points in the market. A bearish divergence occurs when the price records a higher high, but the oscillator fails to do so. Conversely, a bullish divergence happens when the price hits a lower low while the oscillator does not. These divergences can help traders anticipate potential market turns ahead of time.
Key levels to watch in the Smoothed Stochastic are 20 and 80. Values below 20 suggest oversold conditions (potential buy signals when the %K line crosses above the %D line), while values above 80 indicate overbought conditions (potential sell signals when the %K line crosses below the %D line).