OPEN-SOURCE SCRIPT

RSI + SMA Indicator

//version=5
indicator("RSI + SMA Indicator", overlay=true)

// Parametreler
rsiLength = input(14, title="RSI Length")
smaLength = input(50, title="SMA Length")
rsiOverbought = input(70, title="RSI Overbought Level")
rsiOversold = input(30, title="RSI Oversold Level")

// RSI hesaplama
rsi = ta.rsi(close, rsiLength)

// SMA hesaplama
sma = ta.sma(close, smaLength)

// Al/Sat koşulları
buySignal = rsi < rsiOversold and close > sma
sellSignal = rsi > rsiOverbought and close < sma

// Al/Sat oklarını grafiğe çiz
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// SMA'yı grafiğe ekle
plot(sma, color=color.blue, title="SMA")
Bands and ChannelsChart patterns

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm