OPEN-SOURCE SCRIPT

Peshraw strategy 1

62
//version=5
indicator("Peshraw strategy 1", overlay=false)

// --- Stochastic Settings
kPeriod = 100
dPeriod = 3
slowing = 3

k = ta.sma(ta.stoch(close, high, low, kPeriod), slowing)
d = ta.sma(k, dPeriod)

// --- Moving Average on Stochastic %K
maLength = 2
maOnK = ta.sma(k, maLength)

// --- Plot Stochastic
plot(k, color=color.blue, title="%K")
plot(d, color=color.orange, title="%D")

// --- Plot MA(2) on %K
plot(maOnK, color=color.red, title="MA(2) on %K")

// --- Levels (fix hline error)
hline(9, "Level 9", color=color.gray, linestyle=hline.style_dotted)
hline(18, "Level 18", color=color.gray, linestyle=hline.style_dotted)
hline(27, "Level 27", color=color.gray, linestyle=hline.style_dotted)
hline(36, "Level 36", color=color.gray, linestyle=hline.style_dotted)
hline(45, "Level 45", color=color.gray, linestyle=hline.style_dotted)
hline(54, "Level 54", color=color.gray, linestyle=hline.style_dotted)
hline(63, "Level 63", color=color.gray, linestyle=hline.style_dotted)
hline(72, "Level 72", color=color.gray, linestyle=hline.style_dotted)
hline(81, "Level 81", color=color.gray, linestyle=hline.style_dotted)
hline(91, "Level 91", color=color.gray, linestyle=hline.style_dotted)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.