OPEN-SOURCE SCRIPT

AQS Gold Strategy

51
//version=5
indicator("AQS Gold Strategy", overlay=true)

// === المؤشرات ===
// EMA 200 لتحديد الاتجاه
ema200 = ta.ema(close, 200)
plot(ema200, color=color.orange, title="EMA 200")

// MACD
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
macd_cross_up = ta.crossover(macdLine, signalLine)
macd_cross_down = ta.crossunder(macdLine, signalLine)

// Stochastic RSI
k = ta.stoch(close, high, low, 14)
d = ta.sma(k, 3)
stoch_overbought = k > 80 and d > 80
stoch_oversold = k < 20 and d < 20

// Volume Filter
vol_condition = volume > ta.sma(volume, 20)

// === شروط الدخول والخروج ===
// دخول شراء: تقاطع MACD صاعد + تشبع شراء في Stoch RSI + السعر فوق EMA 200
long_condition = macd_cross_up and stoch_oversold and close > ema200 and vol_condition

// خروج شراء أو دخول بيع: تقاطع MACD هابط + تشبع بيع في Stoch RSI + السعر تحت EMA 200
short_condition = macd_cross_down and stoch_overbought and close < ema200 and vol_condition

// === رسم إشارات الدخول والخروج ===
plotshape(long_condition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(short_condition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// === تنبيهات ===
alertcondition(long_condition, title="Buy Alert", message="إشارة شراء حسب استراتيجية AQS Gold")
alertcondition(short_condition, title="Sell Alert", message="إشارة بيع حسب استراتيجية AQS Gold")

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.