//@version=5 strategy("V7 Webhook - 15s Confluence", overlay=true) // Inputs ema50_len = input.int(50, "50 EMA") kijun_len = input.int(26, "Kijun") ema50 = ta.ema(close, 50) ema20 = ta.ema(close, 20) kijun = math.avg(ta.highest(high, kijun_len), ta.lowest(low, kijun_len)) // 1m Bollinger bb_mid_1m = request.security(syminfo.tickerid, "1", ta.sma(close, 20)) bb_std_1m = request.security(syminfo.tickerid, "1", ta.stdev(close, 20)) bb_top_1m = bb_mid_1m + bb_std_1m * 2 bb_bot_1m = bb_mid_1m - bb_std_1m * 2 close_1m = request.security(syminfo.tickerid, "1", close) // HTF ema50_5m = request.security(syminfo.tickerid, "5", ta.ema(close, 50)) ema50_15m = request.security(syminfo.tickerid, "15", ta.ema(close, 50)) // RSI ADX rsi_1m = request.security(syminfo.tickerid, "1", ta.rsi(close, 14)) adx_1m = request.security(syminfo.tickerid, "1", ta.adx(14)) var bool waitUp = false var bool waitDown = false if ta.crossover(close, ema50) waitUp := true waitDown := false if ta.crossunder(close, ema50) waitDown := true waitUp := false // Golden Cross = 50 EMA crosses Kijun goldenCrossUp = ta.crossover(ema50, kijun) goldenCrossDown = ta.crossunder(ema50, kijun) retestUp = waitUp and close > ema50 and low <= ema50 * 1.0003 retestDown = waitDown and close < ema50 and high >= ema50 * 0.9997 // BB Position bbPos = close_1m <= bb_bot_1m ? "BOTTOM" : close_1m <= bb_mid_1m ? "MIDDLE" : close_1m >= bb_top_1m ? "TOP" : "MIDDLE" bbBuy = bbPos == "BOTTOM" or bbPos == "MIDDLE" bbSell = bbPos == "TOP" or bbPos == "MIDDLE" // Kijun kijunPos = close > kijun ? "ABOVE" : "BELOW" // Bias Candle EMA Inside Check biasOpen = open biasClose = close emaInside = (ema20 > math.min(biasOpen, biasClose) and ema20 < math.max(biasOpen, biasClose)) or (ema50 > math.min(biasOpen, biasClose) and ema50 < math.max(biasOpen, biasClose)) wickOnly = (high > ema50 and close < ema50) or (low < ema50 and close > ema50) // Structure HL / LH higherLow = low > low[1] lowerHigh = high < high[1] structure = higherLow ? "HL_RETEST_LH" : lowerHigh ? "LH_RETEST_HL" : "NONE" // Final Signals buySignal = retestUp and close > kijun and bbBuy and higherLow and not emaInside or (retestUp and wickOnly) sellSignal = retestDown and close < kijun and bbSell and lowerHigh and not emaInside or (retestDown and wickOnly) // === WEBHOOK ALERTS - COPY THIS JSON EXACTLY === if buySignal alert('{"signal":"BUY","symbol":"{{ticker}}","price":"{{close}}","timeframe":"15s","rsi":"' + str.tostring(rsi_1m) + '","adx":"' + str.tostring(adx_1m) + '","golden_cross":true,"retest_50ema":true,"bb_position":"' + bbPos + '","kijun_position":"' + kijunPos + '","ema_inside_candle":' + str.tostring(emaInside) + ',"wick_only":' + str.tostring(wickOnly) + ',"structure":"' + structure + '","account":"Exness-MT5Real"}', alert.freq_once_per_bar_close) if sellSignal alert('{"signal":"SELL","symbol":"{{ticker}}","price":"{{close}}","timeframe":"15s","rsi":"' + str.tostring(rsi_1m) + '","adx":"' + str.tostring(adx_1m) + '","golden_cross":true,"retest_50ema":true,"bb_position":"' + bbPos + '","kijun_position":"' + kijunPos + '","ema_inside_candle":' + str.tostring(emaInside) + ',"wick_only":' + str.tostring(wickOnly) + ',"structure":"' + structure + '","account":"Exness-MT5Real"}', alert.freq_once_per_bar_close) plot(ema50, "50 EMA", color.orange, 2) plot(ema20, "20 EMA", color.yellow, 1) plot(kijun, "Kijun", color.purple, 2) plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), size=size.small, text="BUY V7") plotshape(sellSignal, style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), size=size.small, text="SELL V7")