My trade alert

Wait 5 sec.

My trade alert United States Dollar / Japanese YenCMCMARKETS:USDJPYdavefresh//@version=5 indicator("4H + 15M Stochastic + EMA + Zone Alert", overlay=true) // === INPUTS === stochKlen = input.int(14, title="Stochastic %K Length") stochDlen = input.int(3, title="Stochastic %D Smoothing") stochSmooth = input.int(3, title="Stochastic Smoothing") emaLen = input.int(200, title="EMA Length") // === HIGHER TIMEFRAME (4H) === htf = "240" = request.security(syminfo.tickerid, htf, ta.stoch(close, high, low, stochKlen, stochDlen, stochSmooth)) // === LOWER TIMEFRAME (15M) === ltf_k = ta.stoch(close, high, low, stochKlen, stochDlen, stochSmooth) ltf_d = ta.sma(ltf_k, stochSmooth) // === EMA 200 === ema200 = ta.ema(close, emaLen) ema200_4h = request.security(syminfo.tickerid, htf, ta.ema(close, emaLen)) // === ZONE LOGIC: CHECK IF PRICE IS INSIDE MANUAL ZONE === // You’ll draw zones manually using rectangle drawings. // For testing, use this input zone range: zoneTop = input.float(na, title="Supply Zone Top (for alert test)") zoneBottom = input.float(na, title="Demand Zone Bottom (for alert test)") inZone = (not na(zoneTop) and high = zoneBottom) // === TRADE CONDITIONS === // Sell Conditions sellCond = htf_k > 80 and htf_k < htf_d and // 4H stoch cross down ltf_k > 80 and ltf_k < ltf_d and // 15M stoch cross down close < ema200 and close < ema200_4h and inZone // Buy Conditions buyCond = htf_k < 20 and htf_k > htf_d and ltf_k < 20 and ltf_k > ltf_d and close > ema200 and close > ema200_4h and inZone // === ALERTS === alertcondition(sellCond, title="SELL Setup", message="SELL Setup: 4H + 15M aligned, under EMA 200, at supply zone") alertcondition(buyCond, title="BUY Setup", message="BUY Setup: 4H + 15M aligned, over EMA 200, at demand zone")