PROTECTED SOURCE SCRIPT

مؤشر الذهب المتقدم خاص رامى

20
//version=5
indicator("مؤشر الذهب المتقدم", overlay=true)

// إعدادات المدخلات
fastMA = input.int(9, title="المتوسط السريع")
slowMA = input.int(21, title="المتوسط البطيء")
rsiLength = input.int(14, title="مدة RSI")
oversold = input.int(30, title="مستوى ذروة البيع")
overbought = input.int(70, title="مستوى ذروة الشراء")

// المتوسطات المتحركة
maFast = ta.sma(close, fastMA)
maSlow = ta.sma(close, slowMA)

// مؤشر RSI
rsi = ta.rsi(close, rsiLength)

// تحديد الإشارات
buySignal = ta.crossover(maFast, maSlow) and rsi < overbought
sellSignal = ta.crossunder(maFast, maSlow) and rsi > oversold

// رسم المتوسطات
plot(maFast, color=color.blue, linewidth=2)
plot(maSlow, color=color.red, linewidth=2)

// تمييز الإشارات على الرسم البياني
plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="إشارة شراء")
plotshape(sellSignal, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="إشارة بيع")

// خلفية ملونة بناءً على الاتجاه
bgcolor(maFast > maSlow ? color.new(color.green, 90) : color.new(color.red, 90))

// عرض RSI في نافذة منفصلة
plot(rsi, "RSI", color=color.purple, linewidth=2, trackprice=true)
hline(oversold, "مستوى ذروة البيع", color=color.red, linestyle=hline.style_dashed)
hline(overbought, "مستوى ذروة الشراء", color=color.green, linestyle=hline.style_dashed)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.