Gold Sniper ProGOLD (US$/OZ)TVC:GOLDDarrmudi//@version=5 indicator("GOLD SNIPER PRO V3 💣", overlay=true) // ================= EMA ================= emaFast = ta.ema(close, 20) emaSlow = ta.ema(close, 50) // ================= RSI ================= rsi = ta.rsi(close, 14) // ================= MACD ================= = ta.macd(close, 12, 26, 9) macdBull = macdLine > signalLine macdBear = macdLine < signalLine // ================= VOLUME ================= volAvg = ta.sma(volume, 20) volSpike = volume > volAvg * 1.5 // ================= ATR ================= atr = ta.atr(14) atrFilter = atr > ta.sma(atr, 20) // ================= SUPPORT RESISTANCE ================= support = ta.lowest(low, 20) resistance = ta.highest(high, 20) // ================= BREAKOUT ================= breakoutBuy = close > resistance breakoutSell = close < support // ================= TREND ================= bullTrend = emaFast > emaSlow bearTrend = emaFast < emaSlow // ================= SIGNAL ================= buySignal = (bullTrend and rsi < 40 and macdBull and volSpike and atrFilter) or breakoutBuy sellSignal = (bearTrend and rsi > 60 and macdBear and volSpike and atrFilter) or breakoutSell // ================= AUTO TP SL ================= tpBuy = close + atr * 2 slBuy = close - atr * 1.2 tpSell = close - atr * 2 slSell = close + atr * 1.2 // ================= TRAILING ================= trailBuy = close - atr trailSell = close + atr // ================= PLOT ================= plot(emaFast, color=color.green, linewidth=2) plot(emaSlow, color=color.red, linewidth=2) plot(support, "Support", color=color.blue) plot(resistance, "Resistance", color=color.orange) // ================= LABEL ================= if (buySignal) label.new(bar_index, low, "BUY 🚀", color=color.green, style=label.style_label_up) line.new(bar_index, tpBuy, bar_index+10, tpBuy, color=color.green) line.new(bar_index, slBuy, bar_index+10, slBuy, color=color.red) if (sellSignal) label.new(bar_index, high, "SELL 🔻", color=color.red, style=label.style_label_down) line.new(bar_index, tpSell, bar_index+10, tpSell, color=color.green) line.new(bar_index, slSell, bar_index+10, slSell, color=color.red) // ================= ALERT ================= alertcondition(buySignal, title="BUY SIGNAL", message="GOLD BUY 🚀") alertcondition(sellSignal, title="SELL SIGNAL", message="GOLD SELL 🔻") // ================= BACKGROUND ================= bgcolor(buySignal ? color.new(color.green, 85) : na) bgcolor(sellSignal ? color.new(color.red, 85) : na)