0 beğenilme 0 beğenilmeme
196 kez görüntülendi

trading viev de ki komutlar:

AL sinyali için:

//@version=5

indicator(title="Stochastic RSI + EMA", shorttitle="Stoch RSI + EMA", overlay=false)

 

// Stokastik RSI Parametreleri

lengthRSI = input.int(14, title="RSI Length", minval=1)

smoothK = input.int(3, title="%K Smoothing", minval=1)

smoothD = input.int(3, title="%D Smoothing", minval=1)

rsi = ta.rsi(close, lengthRSI)

k = ta.sma(ta.stoch(rsi, rsi, rsi, smoothK), smoothK)

d = ta.sma(k, smoothD)

 

// EMA hesaplaması, kaynak olarak 5 günlük Stokastik RSI %K değerini kullanır

lengthEMA = input.int(5, minval=1, title="EMA Length")

emaSource = ta.sma(ta.stoch(rsi, rsi, rsi, lengthEMA), lengthEMA)

ema = ta.ema(emaSource, lengthEMA)

 

// Stokastik RSI ve EMA çizimleri

plot(k, title="%K", color=color.blue)

plot(d, title="%D", color=color.red)

plot(ema, title="EMA", color=color.green)

 

// 0, 30, 50, 70 ve 100 seviyelerini çizip renklendirme

hline(0, "Level 0", color=color.red)

hline(30, "Level 30", color=color.orange)

hline(50, "Level 50", color=color.gray)

hline(70, "Level 70", color=color.orange)

hline(100, "Level 100", color=color.red)

SAT SİNYALİ İÇİN:

//@version=5

indicator(title="Relative Strength Index", shorttitle="RSI_BENN", format=format.price, precision=2, timeframe="", timeframe_gaps=true)

 

ma(source, length, type) =>

    switch type

        "SMA" => ta.sma(source, length)

        "Bollinger Bands" => ta.sma(source, length)

        "EMA" => ta.ema(source, length)

        "SMMA (RMA)" => ta.rma(source, length)

        "WMA" => ta.wma(source, length)

        "VWMA" => ta.vwma(source, length)

 

rsiLengthInput = input.int(14, minval=1, title="RSI Length", group="RSI Settings")

rsiSourceInput = input.source(close, "Source", group="RSI Settings")

maTypeInput = input.string("SMA", title="MA Type", options=["SMA", "Bollinger Bands", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="MA Settings")

maLengthInput = input.int(14, title="MA Length", group="MA Settings")

bbMultInput = input.float(2.0, minval=0.001, maxval=50, title="BB StdDev", group="MA Settings")

 

up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput)

down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput)

rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

rsiMA = ma(rsi, maLengthInput, maTypeInput)

isBB = maTypeInput == "Bollinger Bands"

 

rsiPlot = plot(rsi, "RSI", color=#7E57C2)

plot(rsiMA, "RSI-based MA", color=color.yellow)

rsiUpperBand = hline(70, "RSI Upper Band", color=#787B86)

midline = hline(50, "RSI Middle Band", color=color.new(#787B86, 50))

rsiLowerBand = hline(30, "RSI Lower Band", color=#787B86)

fill(rsiUpperBand, rsiLowerBand, color=color.rgb(126, 87, 194, 90), title="RSI Background Fill")

bbUpperBand = plot(isBB ? rsiMA + ta.stdev(rsi, maLengthInput) * bbMultInput : na, title = "Upper Bollinger Band", color=color.green)

bbLowerBand = plot(isBB ? rsiMA - ta.stdev(rsi, maLengthInput) * bbMultInput : na, title = "Lower Bollinger Band", color=color.green)

fill(bbUpperBand, bbLowerBand, color= isBB ? color.new(color.green, 90) : na, title="Bollinger Bands Background Fill")

 

midLinePlot = plot(50, color = na, editable = false, display = display.none)

fill(rsiPlot, midLinePlot, 100, 70, top_color = color.new(color.green, 0), bottom_color = color.new(color.green, 100),  title = "Overbought Gradient Fill")

fill(rsiPlot, midLinePlot, 30,  0,  top_color = color.new(color.red, 100), bottom_color = color.new(color.red, 0),      title = "Oversold Gradient Fill")

Grafik kategorisinde (12 puan) tarafından | 196 kez görüntülendi

Bu soruya cevap vermek için lütfen giriş yapınız veya kayıt olunuz.

7,637 soru
7,640 cevap
4,448 yorum
10,967 kullanıcı