OPEN-SOURCE SCRIPT

RSI EMA Moving Average Strategy

//version=6
indicator("RSI EMA Moving Average Strategy", overlay=true)

// Inputlar
RSI_Period = input.int(14, title="RSI davri")
RSI_Buy_Level = input.int(20, title="RSI Buy darajasi")
RSI_Sell_Level = input.int(80, title="RSI Sell darajasi")
EMA_Period = input.int(100, title="EMA davri")
Liquidity_Range = input.int(10, title="Likvidlik zonasi uchun barlar soni")

// Indikatorlar hisob-kitobi
rsi = ta.rsi(close, RSI_Period)
ema = ta.ema(close, EMA_Period)

// Likvidlik darajalarini aniqlash
highLiquidity = ta.highest(high, Liquidity_Range)
lowLiquidity = ta.lowest(low, Liquidity_Range)

// Signal shartlari
var string signal = na
var label buyLabel = na
var label sellLabel = na
var label exitLabel = na

if (rsi < RSI_Buy_Level and close > ema and close > lowLiquidity)
signal := "Buy"
label.delete(buyLabel)
buyLabel := label.new(bar_index, close, "Buy", style=label.style_label_down, color=color.green)
alert("Buy signali topildi!", alert.freq_once_per_bar)

if (rsi > RSI_Sell_Level and close < ema and close < highLiquidity)
signal := "Sell"
label.delete(sellLabel)
sellLabel := label.new(bar_index, close, "Sell", style=label.style_label_up, color=color.red)
alert("Sell signali topildi!", alert.freq_once_per_bar)

if ((close < ema and signal == "Buy") or (close > ema and signal == "Sell"))
label.delete(exitLabel)
exitLabel := label.new(bar_index, close, "Exit", style=label.style_label_down, color=color.yellow)
alert("Exit signali topildi!", alert.freq_once_per_bar)
Breadth Indicators

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明