OPEN-SOURCE SCRIPT

Custom RSI & Volume Condition

58
//version=5
indicator("Custom RSI & Volume Condition", overlay=true)

// دوال مساعدة
crossUp(src, level) =>
ta.crossover(src, level)

riseByPercent(src, percent, bars) =>
src > src[bars] * (1 + percent/100)

// حساب RSI
rsi = ta.rsi(close, 14)

// الشرط الأول: اختراق RSI لمستوى 45 أو 50
cond1 = crossUp(rsi, 45) or crossUp(rsi, 50)

// الشرط الثاني: RSI > 50 مع اختراق مستوى 55 أو 60
cond2 = (rsi > 50 and crossUp(rsi, 55)) or (rsi > 50 and crossUp(rsi, 60))

// الشرط الثالث: ارتفاع السعر بنسبة 2% مقارنة بالشمعة السابقة
cond3 = riseByPercent(close, 2, 1)

// الشرط الرابع: حجم التداول أكبر من حجم الشمعة السابقة
cond4 = volume > volume[1]

// التجميع النهائي
signal = (cond1 or cond2) and cond3 and cond4

// عرض إشارة على الرسم
plotshape(signal, title="Buy Signal", style=shape.labelup, color=color.green, text="BUY")

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.