📊 Indicadores & Scripts

10 Indicadores Pine Script Prontos para Copiar no TradingView

Por Dan Machado · Abril 2026 · 15 min · Todos testados e funcionais

Todos os indicadores abaixo são Pine Script v5, gerados por IA e testados no TradingView. Basta copiar o código, colar no Pine Editor e adicionar ao gráfico.

📋 Como usar cada indicador

TradingView → Pine Editor (parte inferior) → apague o código padrão → cole o indicador → “Adicionar ao gráfico”. Para tutorial detalhado, veja Como Usar IA para Criar Indicadores.

#01

RSI com Setas de Compra/Venda

Iniciante

Setas verdes de compra quando RSI cruza abaixo de 30, vermelhas de venda quando cruza acima de 70. Fundo colorido + alertas.

Pine Script v5📋 Copiar
//@version=5
indicator("RSI Setas — IA Trader Pro", overlay=true)
rsiP = input.int(14, "Período RSI")
ob = input.int(70, "Sobrecomprado")
os = input.int(30, "Sobrevendido")
r = ta.rsi(close, rsiP)
buy = ta.crossunder(r, os)
sell = ta.crossover(r, ob)
plotshape(buy, "Compra", shape.triangleup, location.belowbar, color.green, size=size.normal)
plotshape(sell, "Venda", shape.triangledown, location.abovebar, color.red, size=size.normal)
bgcolor(r < os ? color.new(color.green, 90) : r > ob ? color.new(color.red, 90) : na)
alertcondition(buy, "RSI Compra", "RSI sobrevendido")
alertcondition(sell, "RSI Venda", "RSI sobrecomprado")
#02

Cruzamento EMA 9/21 com Volume

Intermediário

Setas quando EMA rápida cruza a lenta COM confirmação de volume acima da média. Velas coloridas por tendência.

Pine Script v5📋 Copiar
//@version=5
indicator("EMA Cross + Vol — IA Trader Pro", overlay=true)
f = input.int(9, "EMA Rápida")
s = input.int(21, "EMA Lenta")
vl = input.int(20, "Média Volume")
ef = ta.ema(close, f)
es = ta.ema(close, s)
hv = volume > ta.sma(volume, vl)
bc = ta.crossover(ef, es) and hv
sc = ta.crossunder(ef, es) and hv
plot(ef, "EMA Rápida", color.green, 2)
plot(es, "EMA Lenta", color.red, 2)
plotshape(bc, "Compra", shape.triangleup, location.belowbar, color.green, size=size.large)
plotshape(sc, "Venda", shape.triangledown, location.abovebar, color.red, size=size.large)
barcolor(ef > es ? color.green : color.red)
alertcondition(bc, "Cross Alta", "EMA cruzou para cima + volume")
alertcondition(sc, "Cross Baixa", "EMA cruzou para baixo + volume")
#03

Bollinger Bands + RSI Combo

Avançado

Sinal de compra quando preço toca banda inferior E RSI sobrevendido. Labels BUY/SELL no gráfico.

Pine Script v5📋 Copiar
//@version=5
indicator("BB + RSI — IA Trader Pro", overlay=true)
[m, u, l] = ta.bb(close, 20, 2.0)
r = ta.rsi(close, 14)
buy = close <= l and r < 35
sell = close >= u and r > 65
p1 = plot(u, "BB Sup", color.red, 1)
p2 = plot(l, "BB Inf", color.green, 1)
plot(m, "BB Meio", color.gray, 1)
fill(p1, p2, color.new(color.blue, 92))
plotshape(buy, "BUY", shape.labelup, location.belowbar, color.green, text="BUY", textcolor=color.white, size=size.large)
plotshape(sell, "SELL", shape.labeldown, location.abovebar, color.red, text="SELL", textcolor=color.white, size=size.large)
alertcondition(buy, "BB+RSI Compra", "Preço na banda inferior + RSI baixo")
alertcondition(sell, "BB+RSI Venda", "Preço na banda superior + RSI alto")
#04

MACD Histogram Colorido

Iniciante

MACD com histograma que muda de cor conforme momentum crescente/decrescente. Setas no cruzamento.

Pine Script v5📋 Copiar
//@version=5
indicator("MACD Color — IA Trader Pro")
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
histColor = hist >= 0 ? (hist > hist[1] ? #00E676 : #80E0A0) : (hist < hist[1] ? #FF5252 : #FF9090)
plot(macdLine, "MACD", color.blue, 2)
plot(signalLine, "Signal", color.orange, 2)
plot(hist, "Histogram", histColor, 1, plot.style_columns)
cross_up = ta.crossover(macdLine, signalLine)
cross_dn = ta.crossunder(macdLine, signalLine)
plotshape(cross_up, "Alta", shape.triangleup, location.bottom, color.green, size=size.small)
plotshape(cross_dn, "Baixa", shape.triangledown, location.top, color.red, size=size.small)
alertcondition(cross_up, "MACD Alta", "MACD cruzou para cima")
alertcondition(cross_dn, "MACD Baixa", "MACD cruzou para baixo")
#05

Suporte e Resistência Automáticos

Intermediário

Detecta pivots de alta/baixa e desenha linhas horizontais nos níveis mais recentes de suporte e resistência.

Pine Script v5📋 Copiar
//@version=5
indicator("Suporte/Resistência — IA Trader Pro", overlay=true, max_lines_count=10)
lb = input.int(20, "Lookback")
ph = ta.pivothigh(high, lb, lb)
pl = ta.pivotlow(low, lb, lb)
if not na(ph)
    line.new(bar_index-lb, ph, bar_index, ph, color=color.red, width=2, extend=extend.right, style=line.style_dashed)
    label.new(bar_index-lb, ph, "R " + str.tostring(ph, "#.##"), color=color.new(color.red, 80), textcolor=color.red, style=label.style_label_down, size=size.small)
if not na(pl)
    line.new(bar_index-lb, pl, bar_index, pl, color=color.green, width=2, extend=extend.right, style=line.style_dashed)
    label.new(bar_index-lb, pl, "S " + str.tostring(pl, "#.##"), color=color.new(color.green, 80), textcolor=color.green, style=label.style_label_up, size=size.small)
#06

Volume Profile Simplificado

Intermediário

Barras de volume coloridas: verde quando volume está acima da média (força), vermelho quando abaixo (fraqueza).

Pine Script v5📋 Copiar
//@version=5
indicator("Volume Smart — IA Trader Pro")
vp = input.int(20, "Média de Volume")
vm = ta.sma(volume, vp)
vr = volume / vm
vc = vr > 2.0 ? #00E676 : vr > 1.0 ? #4CAF50 : vr > 0.5 ? #FFC107 : #FF5252
plot(volume, "Volume", vc, 2, plot.style_columns)
plot(vm, "Média", color.white, 1)
hline(0)
alertcondition(volume > vm * 2, "Volume Explosão", "Volume 2x acima da média")
#07

EMA Rainbow (5 médias)

Iniciante

5 EMAs (9, 21, 50, 100, 200) com cores do arco-íris. Quando todas estão alinhadas = tendência forte.

Pine Script v5📋 Copiar
//@version=5
indicator("EMA Rainbow — IA Trader Pro", overlay=true)
plot(ta.ema(close, 9), "EMA 9", #00E676, 2)
plot(ta.ema(close, 21), "EMA 21", #448AFF, 2)
plot(ta.ema(close, 50), "EMA 50", #FFC107, 2)
plot(ta.ema(close, 100), "EMA 100", #FF9800, 2)
plot(ta.ema(close, 200), "EMA 200", #FF5252, 3)
#08

Detector de Divergência RSI

Avançado

Detecta divergências entre preço e RSI. Divergência bullish (compra) e bearish (venda) com labels.

Pine Script v5📋 Copiar
//@version=5
indicator("RSI Divergência — IA Trader Pro", overlay=true)
rsiLen = input.int(14, "RSI Período")
lb = input.int(5, "Lookback Pivot")
r = ta.rsi(close, rsiLen)
pl = ta.pivotlow(low, lb, lb)
ph = ta.pivothigh(high, lb, lb)
// Divergência Bullish: preço faz low mais baixo, RSI faz low mais alto
bullDiv = not na(pl) and low[lb] < ta.valuewhen(not na(pl), low[lb], 1) and r[lb] > ta.valuewhen(not na(pl), r[lb], 1)
// Divergência Bearish: preço faz high mais alto, RSI faz high mais baixo
bearDiv = not na(ph) and high[lb] > ta.valuewhen(not na(ph), high[lb], 1) and r[lb] < ta.valuewhen(not na(ph), r[lb], 1)
plotshape(bullDiv, "Div Bull", shape.labelup, location.belowbar, color.green, text="DIV+", textcolor=color.white, size=size.small, offset=-lb)
plotshape(bearDiv, "Div Bear", shape.labeldown, location.abovebar, color.red, text="DIV-", textcolor=color.white, size=size.small, offset=-lb)
alertcondition(bullDiv, "Divergência Bullish", "RSI divergência de alta")
alertcondition(bearDiv, "Divergência Bearish", "RSI divergência de baixa")
#09

Candle Pattern Detector

Intermediário

Detecta padrões de candlestick: Doji, Hammer, Engulfing (alta e baixa). Labels no gráfico.

Pine Script v5📋 Copiar
//@version=5
indicator("Candle Patterns — IA Trader Pro", overlay=true)
body = math.abs(close - open)
wick = high - low
// Doji: corpo muito pequeno
doji = body < wick * 0.1
// Hammer: sombra inferior longa, corpo pequeno no topo
hammer = (low == math.min(open, close) - (wick * 0.6)) == false and (math.min(open, close) - low) > body * 2 and (high - math.max(open, close)) < body * 0.5 and close > open
// Bullish Engulfing
bullEngulf = close[1] < open[1] and close > open and close > open[1] and open < close[1]
// Bearish Engulfing  
bearEngulf = close[1] > open[1] and close < open and close < open[1] and open > close[1]
plotshape(doji, "Doji", shape.diamond, location.abovebar, color.yellow, size=size.tiny)
plotshape(hammer, "Hammer", shape.triangleup, location.belowbar, #00E676, size=size.small)
plotshape(bullEngulf, "Bull Engulf", shape.labelup, location.belowbar, color.green, text="BE", textcolor=color.white, size=size.small)
plotshape(bearEngulf, "Bear Engulf", shape.labeldown, location.abovebar, color.red, text="BE", textcolor=color.white, size=size.small)
#10

Super Trend Indicator

Avançado

Linha que acompanha a tendência e muda de cor (verde=alta, vermelho=baixa). Setas na mudança de direção.

Pine Script v5📋 Copiar
//@version=5
indicator("SuperTrend — IA Trader Pro", overlay=true)
atrP = input.int(10, "ATR Período")
mult = input.float(3.0, "Multiplicador")
atr = ta.atr(atrP)
up = hl2 - mult * atr
dn = hl2 + mult * atr
var float trendUp = na
var float trendDn = na
var int trend = 1
trendUp := close[1] > nz(trendUp[1]) ? math.max(up, nz(trendUp[1])) : up
trendDn := close[1] < nz(trendDn[1]) ? math.min(dn, nz(trendDn[1])) : dn
trend := close > nz(trendDn[1]) ? 1 : close < nz(trendUp[1]) ? -1 : nz(trend[1])
st = trend == 1 ? trendUp : trendDn
stColor = trend == 1 ? #00E676 : #FF5252
plot(st, "SuperTrend", stColor, 3)
buySignal = trend == 1 and trend[1] == -1
sellSignal = trend == -1 and trend[1] == 1
plotshape(buySignal, "Compra", shape.triangleup, location.belowbar, #00E676, size=size.normal)
plotshape(sellSignal, "Venda", shape.triangledown, location.abovebar, #FF5252, size=size.normal)
alertcondition(buySignal, "ST Compra", "SuperTrend virou para alta")
alertcondition(sellSignal, "ST Venda", "SuperTrend virou para baixa")

🚀 Teste estes indicadores com conta demo grátis — analise no TradingView e opere na Deriv:

Abrir Conta Demo Deriv →

Alternativa: Demo IQ Option →

DM

Dan Machado

Biblioteca completa em Indicadores & Scripts.

⚠️ Indicadores são ferramentas educacionais, não garantem lucros. Trading envolve risco. Disclaimer.

Posts Similares