OPEN-SOURCE SCRIPT
Custom RSI & Volume Condition

//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")
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")
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
وتستمر الحياة
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
وتستمر الحياة
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。