//@version=5 indicator("4H Pro Long/Short Signals", overlay=true

Wait 5 sec.

//@version=5 indicator("4H Pro Long/Short Signals", overlay=trueBitcoin / TetherUSBINANCE:BTCUSDTmahdisoori5623//@version=5 indicator("4H Pro Long/Short Signals", overlay=true) // === EMA settings === emaFast = ta.ema(close, 50) emaSlow = ta.ema(close, 200) plot(emaFast, title="EMA 50", color=color.orange) plot(emaSlow, title="EMA 200", color=color.blue) // === RSI settings === rsi = ta.rsi(close, 14) rsiOverbought = 70 rsiOversold = 30 // === MACD settings === = ta.macd(close, 12, 26, 9) macdBullish = ta.crossover(macdLine, signalLine) macdBearish = ta.crossunder(macdLine, signalLine) // === Entry Conditions === longCondition = ta.crossover(emaFast, emaSlow) and rsi < rsiOverbought and macdBullish shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > rsiOversold and macdBearish // === Plot signals === plotshape(longCondition, title="Long Entry", location=location.belowbar, color=color.green, style=shape.labelup, text="LONG") plotshape(shortCondition, title="Short Entry", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT") // === Alerts === alertcondition(longCondition, title="Long Signal Alert", message="🔔 LONG Signal on {{ticker}} (4H)") alertcondition(shortCondition, title="Short Signal Alert", message="🔔 SHORT Signal on {{ticker}} (4H)")