ktuimala

KT_Smooth_Stochastic

I normally don't publish my indicators. However, I couldn't find a smoothed stochastic on TradingView officially or unofficially. This is a standard implementation of a smoothed Fast Stochastic where %K and %D are calculated and then smoothed by n periods. This helps to reduce chop and gives better extreme signals.

I have defaulted the indicator to use commonly used settings where %K is over 14 periods, %D is over 7 period, and the smoothing factor is 3 periods. I have also defaulted the extreme lines to an upper band of 80, mid band of 50, and lower band of 20. However, my favorite settings are %K = 10, %D = 10, Smooth = 3, upper band = 75, mid band = 50, and lower band = 25.
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?
// Title: Smooth Stochastic
// Author: Kaleb Tuimala
// Date: 06/25/2016
//
// Description: A standard implementation of a smoothed Fast Stochastic.
//              The %K and %D are smoothed n periods after they are calculated.
//
//@version=2
study(title="KT_Smooth_Stochastic", shorttitle="Smooth Stochastic")
periodK = input(14, minval=1, title="%K")
periodD = input(7, minval=1, title="%D")
smooth = input(3, minval=1, title="Smooth")

k = stoch(close, high, low, periodK)
d = sma(k, periodD)

sK = sma(k, smooth)
sD = sma(d, smooth)

uL = hline(80, color=black, linestyle=solid, linewidth=2, title="Upper Line")
mL = hline(50, color=green, linestyle=solid, linewidth=2, title="Middle Line")
lL = hline(20, color=purple, linestyle=solid, linewidth=2, title="Lower Line")

fill(uL, lL, color=gray, transp=80, title="Shaded Region")

plot(sK, color=blue, linewidth=2, title="%K")
plot(sD, color=red, linewidth=2, title="%D")