Bitcoin Fiyatı Yükleniyor...
Ethereum Fiyatı Yükleniyor...
Scroll to Top
kripto altcoin bitcoin tradingview

SUPERTREND AND STOCKRSI AND RSI TABLE

indicator("SUPERTREND AND STOCKRSI AND RSI TABLE",overlay = true)

// Supertrend Parameters

atrPeriod = input.int(10, title="ATR Length", minval=1)

factor = input.float(3.0, title="Factor", minval=0.01, step=0.01)

[supertrend, direction] = ta.supertrend(factor, atrPeriod)

// Stochastic RSI Parameters

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

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

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

lengthStoch = input.int(14, title="Stochastic Length", minval=1)

src = input(close, title="RSI Source")

rsi1 = ta.rsi(src, lengthRSI)

k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK) // Blue Line

d = ta.sma(k, smoothD) // Orange Line

// Overbought and Oversold Levels

h0 = hline(90, title="Upper Band", color=color.gray)

h1 = hline(10, title="Lower Band", color=color.red)

cross_over = ta.crossover(k, d)

cross_under = ta.crossunder(k, d)

rsi_orig = ta.rsi(src, length=14)

rsi_1 = 17

rsi_1_text = "BUY"

rsi_2 = 87

rsi_2_text = "SELL"

// Create Table

var table newtable = table.new(position.top_right, 5, 5, bgcolor=color.gray, frame_color=color.white, frame_width=3)

// Populate Table Header

table.cell(newtable, 0, 0, "SUPERTREND", text_color=color.black, text_size=size.large)

table.cell(newtable, 1, 0, "STOCHRSI", text_color=color.black, text_size=size.large)

table.cell(newtable, 2, 0, "RSI", text_color=color.black, text_size=size.large)

// Supertrend Status

if close > supertrend

    table.cell(newtable, 0, 1, "Yükseliş Trendi", text_color=color.green, text_size=size.large)

else if close < supertrend

    table.cell(newtable, 0, 1, "Düşüş Trendi", text_color=color.red, text_size=size.large)

// Stochastic RSI Status

if k < 5 and cross_over

    table.cell(newtable, 1, 1, "AL", text_color=color.green, text_size=size.large)

else if k > 95 and cross_under

    table.cell(newtable, 1, 1, "SAT", text_color=color.red, text_size=size.large)

else

    table.cell(newtable, 1, 1, "STABİL", text_color=color.blue, text_size=size.large)

// RSI Status

if rsi_orig <= rsi_1

    table.cell(newtable, 2, 1, str.tostring(rsi_1_text), text_color=color.green, text_size=size.large)

else if rsi_orig >= rsi_2

    table.cell(newtable, 2, 1, str.tostring(rsi_2_text), text_color=color.red, text_size=size.large)

else

    table.cell(newtable, 2, 1, "STABİL", text_color=color.blue, text_size=size.large)

Yorum bırakın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Scroll to Top