//version=5 indicator("Padrões de Candles com Setas", overlay=true)
// Funções para identificar padrões de candles bullish_engulfing = (close > open and close[1] < open[1] and close > open[1] and open < close[1]) bearish_engulfing = (close < open and close[1] > open[1] and close < open[1] and open > close[1]) hammer = (close > open and (high - low) > 2 * (close - open) and (close - low) > 2 * (high - close)) shooting_star = (open > close and (high - low) > 2 * (open - close) and (high - open) > 2 * (close - low))
// Detecção de padrões bull_signal = bullish_engulfing or hammer bear_signal = bearish_engulfing or shooting_star
// Exibindo alertas if (bull_signal) alert("Padrão de compra identificado!", alert.freq_once_per_bar) if (bear_signal) alert("Padrão de venda identificado!", alert.freq_once_per_bar)
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.