Hussam

Hussam

//@version=5
indicator("Scalping Strategy with Engulfing", overlay=true)

// إعدادات المتوسطات المتحركة
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

// إعدادات MACD (3,10,16)
= ta.macd(close, 3, 10, 16)

// إعدادات RSI (5)
rsiValue = ta.rsi(close, 5)

// تحديد الشمعة الابتلاعية الصاعدة (Bullish Engulfing)
bullishEngulfing = close > open and close < open and close > open and open < close

// تحديد الشمعة الابتلاعية الهابطة (Bearish Engulfing)
bearishEngulfing = close < open and close > open and close < open and open > close

// شروط الشراء (EMA + MACD + RSI + Bullish Engulfing)
buyCondition = ta.crossover(ema9, ema21) and macdLine > signalLine and rsiValue > 50 and bullishEngulfing

// شروط البيع (EMA + MACD + RSI + Bearish Engulfing)
sellCondition = ta.crossunder(ema9, ema21) and macdLine < signalLine and rsiValue < 50 and bearishEngulfing

// رسم إشارات البيع والشراء
plotshape(buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, size=size.small, title="BUY Signal")
plotshape(sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, size=size.small, title="SELL Signal")

// رسم المتوسطات المتحركة
plot(ema9, title="EMA 9", color=color.blue)
plot(ema21, title="EMA 21", color=color.orange)

Read More

Share:

Latest News