OPEN-SOURCE SCRIPT

James

//version=5
indicator("Forex Entry Signals (RSI + EMA)", overlay=false)

// Configuração do RSI
rsiLength = input(14, "RSI Length")
rsi = ta.rsi(close, rsiLength)

// Configuração da EMA
emaLength = input(50, "EMA Length")
ema = ta.ema(close, emaLength)

// Lógica de compra e venda
buySignal = ta.crossover(close, ema) and rsi < 30
sellSignal = ta.crossunder(close, ema) and rsi > 70

// Plot do RSI
plot(rsi, color=color.blue, linewidth=2, title="RSI")
hline(70, "Overbought", color=color.red)
hline(30, "Oversold", color=color.green)

// Marcar setas no gráfico
if buySignal
label.new(bar_index, close, text="BUY", color=color.green, style=label.style_label_up, textcolor=color.white, size=size.small)

if sellSignal
label.new(bar_index, close, text="SELL", color=color.red, style=label.style_label_down, textcolor=color.white, size=size.small)
Bands and ChannelsBreadth Indicators

開源腳本

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

想在圖表上使用此腳本?

免責聲明