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")

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.