OPEN-SOURCE SCRIPT
EMRVA

//version=5
indicator("EMRVA", overlay=true)
// === الإعدادات ===
emaLength = input.int(200, "EMA Length")
rsiLength = input.int(14, "RSI Length")
volLength = input.int(20, "Volume MA Length")
adxLength = input.int(14, "ADX Length")
adxFilter = input.int(20, "ADX Minimum Value") // فلتر الاتجاه
// === EMA200 ===
ema200 = ta.ema(close, emaLength)
plot(ema200, color=color.orange, linewidth=2, title="EMA 200")
// === MACD ===
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
// === RSI ===
rsi = ta.rsi(close, rsiLength)
// === Volume Confirmation ===
volMA = ta.sma(volume, volLength)
volCond = volume > volMA
// === ADX Manual Calculation ===
upMove = high - high[1]
downMove = low[1] - low
plusDM = na(upMove) ? na : (upMove > downMove and upMove > 0 ? upMove : 0)
minusDM = na(downMove) ? na : (downMove > upMove and downMove > 0 ? downMove : 0)
tr = ta.rma(ta.tr, adxLength)
plusDI = 100 * ta.rma(plusDM, adxLength) / tr
minusDI = 100 * ta.rma(minusDM, adxLength) / tr
dx = 100 * math.abs(plusDI - minusDI) / (plusDI + minusDI)
adx = ta.rma(dx, adxLength)
adxCond = adx > adxFilter
// === شروط الدخول والخروج ===
longCond = close > ema200 and macdLine > signalLine and rsi > 50 and volCond and adxCond
shortCond = close < ema200 and macdLine < signalLine and rsi < 50 and volCond and adxCond
// === منطق الإشارة عند بداية الاتجاه فقط ===
var inLong = false
var inShort = false
buySignal = longCond and not inLong
sellSignal = shortCond and not inShort
if buySignal
inLong := true
inShort := false
if sellSignal
inShort := true
inLong := false
// === إشارات ثابتة ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar,
color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar,
color=color.red, style=shape.labeldown, text="SELL")
// === تنبيهات ===
alertcondition(buySignal, title="Buy Alert", message="📈 إشارة شراء مؤكدة مع فلتر ADX")
alertcondition(sellSignal, title="Sell Alert", message="📉 إشارة بيع مؤكدة مع فلتر ADX")
// === رسم ADX للتأكيد ===
plot(adx, title="ADX", color=color.blue)
hline(adxFilter, "ADX Filter", color=color.red)
indicator("EMRVA", overlay=true)
// === الإعدادات ===
emaLength = input.int(200, "EMA Length")
rsiLength = input.int(14, "RSI Length")
volLength = input.int(20, "Volume MA Length")
adxLength = input.int(14, "ADX Length")
adxFilter = input.int(20, "ADX Minimum Value") // فلتر الاتجاه
// === EMA200 ===
ema200 = ta.ema(close, emaLength)
plot(ema200, color=color.orange, linewidth=2, title="EMA 200")
// === MACD ===
macdLine = ta.ema(close, 12) - ta.ema(close, 26)
signalLine = ta.ema(macdLine, 9)
// === RSI ===
rsi = ta.rsi(close, rsiLength)
// === Volume Confirmation ===
volMA = ta.sma(volume, volLength)
volCond = volume > volMA
// === ADX Manual Calculation ===
upMove = high - high[1]
downMove = low[1] - low
plusDM = na(upMove) ? na : (upMove > downMove and upMove > 0 ? upMove : 0)
minusDM = na(downMove) ? na : (downMove > upMove and downMove > 0 ? downMove : 0)
tr = ta.rma(ta.tr, adxLength)
plusDI = 100 * ta.rma(plusDM, adxLength) / tr
minusDI = 100 * ta.rma(minusDM, adxLength) / tr
dx = 100 * math.abs(plusDI - minusDI) / (plusDI + minusDI)
adx = ta.rma(dx, adxLength)
adxCond = adx > adxFilter
// === شروط الدخول والخروج ===
longCond = close > ema200 and macdLine > signalLine and rsi > 50 and volCond and adxCond
shortCond = close < ema200 and macdLine < signalLine and rsi < 50 and volCond and adxCond
// === منطق الإشارة عند بداية الاتجاه فقط ===
var inLong = false
var inShort = false
buySignal = longCond and not inLong
sellSignal = shortCond and not inShort
if buySignal
inLong := true
inShort := false
if sellSignal
inShort := true
inLong := false
// === إشارات ثابتة ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar,
color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar,
color=color.red, style=shape.labeldown, text="SELL")
// === تنبيهات ===
alertcondition(buySignal, title="Buy Alert", message="📈 إشارة شراء مؤكدة مع فلتر ADX")
alertcondition(sellSignal, title="Sell Alert", message="📉 إشارة بيع مؤكدة مع فلتر ADX")
// === رسم ADX للتأكيد ===
plot(adx, title="ADX", color=color.blue)
hline(adxFilter, "ADX Filter", color=color.red)
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
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.