OPEN-SOURCE SCRIPT

Peshraw strategy 1

88
//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)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.