OPEN-SOURCE SCRIPT

My script

40
//version=5
indicator("ICP Análise Completa", overlay=true)

// Médias Móveis
ma50 = ta.sma(close, 50)
ma200 = ta.sma(close, 200)
plot(ma50, title="MA 50", color=color.blue, linewidth=2)
plot(ma200, title="MA 200", color=color.red, linewidth=2)

// Bollinger Bands
bb_middle = ta.sma(close, 20)
bb_std = ta.stdev(close, 20)
bb_upper = bb_middle + 2 * bb_std
bb_lower = bb_middle - 2 * bb_std
plot(bb_upper, title="BB Upper", color=color.green)
plot(bb_middle, title="BB Middle", color=color.gray)
plot(bb_lower, title="BB Lower", color=color.green)

// RSI
rsi = ta.rsi(close, 14)
rsiOverbought = 70
rsiOversold = 30
hline(rsiOverbought, "RSI Overbought", color=color.red)
hline(rsiOversold, "RSI Oversold", color=color.green)
plot(rsi, title="RSI", color=color.purple, linewidth=2, title="RSI (14)", display=display.none)

// MACD
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
plot(macdLine, title="MACD Line", color=color.teal, linewidth=2)
plot(signalLine, title="Signal Line", color=color.orange, linewidth=2)

// Alertas visuais
plotshape(close > 7, title="Alvo US$7+", location=location.abovebar, color=color.green, style=shape.labelup, text=">7")
plotshape(close < 5, title="Abaixo US$5", location=location.belowbar, color=color.red, style=shape.labeldown, text="<5")

Pernyataan Penyangkalan

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.