//@version=5 strategy("XAUUSD 1M SUPER SNIPER FINAL (D+E+F)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=3) // ===== TIME SESSION (UTC+0, TradingView default) ===== // London: 06:00–10:00 UTC | New York: 12:00–16:00 UTC london = time(timeframe.period, "0600-1000") newyork = time(timeframe.period, "1200-1600") sessionOK = london or newyork // ===== INDICATORS ===== sma100 = ta.sma(close, 100) ema9 = ta.ema(close, 9) rsi14 = ta.rsi(close, 14) volMA = ta.sma(volume, 20) // ===== PLOT ===== plot(sma100, color=color.white, linewidth=2) plot(ema9, color=color.orange) // ===== BUY CONDITIONS ===== buySignal = sessionOK and close > sma100 and low <= ema9 and close > open and close > close[1] and rsi14 > 50 and rsi14 < 68 and volume > volMA // ===== SELL CONDITIONS ===== sellSignal = sessionOK and close < sma100 and high >= ema9 and close < open and close < close[1] and rsi14 < 50 and rsi14 > 32 and volume > volMA // ===== ENTRY ===== if buySignal strategy.entry("BUY", strategy.long) if sellSignal strategy.entry("SELL", strategy.short) // ===== POINT CALC ===== point = syminfo.mintick * 10 // ===== EXIT + TRAILING ===== strategy.exit("BUY EXIT", "BUY", stop = strategy.position_avg_price - (1 * point), limit = strategy.position_avg_price + (4 * point), trail_points = 2 * point, trail_offset = 1 * point) strategy.exit("SELL EXIT", "SELL", stop = strategy.position_avg_price + (1 * point), limit = strategy.position_avg_price - (4 * point), trail_points = 2 * point, trail_offset = 1 * point)