INVITE-ONLY SCRIPT

TEMA Cross • US Scanner (+1/-1/0) — stable

18
//version=5
indicator("TEMA Cross • US Scanner (+1/-1/0) — stable", overlay=false)

// إعدادات عامة
len = input.int(20, "طول TEMA")
tf = input.timeframe("", "الإطار الزمني (فارغ = نفس إطار الشارت)")
confirmOnClose = input.bool(true, "تأكيد بعد إغلاق شمعة الإطار")

// دالة TEMA
tema(src, l)=>
ema1 = ta.ema(src, l)
ema2 = ta.ema(ema1, l)
ema3 = ta.ema(ema2, l)
3 * (ema1 - ema2) + ema3

// أدخل الرموز هنا (بدون مصفوفات)
sym1 = input.symbol("AAPL", "رمز 1")
sym2 = input.symbol("MSFT", "رمز 2")
sym3 = input.symbol("NVDA", "رمز 3")
sym4 = input.symbol("TSLA", "رمز 4")
sym5 = input.symbol("AMZN", "رمز 5")
sym6 = input.symbol("GOOGL", "رمز 6")
sym7 = input.symbol("META", "رمز 7")
sym8 = input.symbol("AMD", "رمز 8")
sym9 = input.symbol("NFLX", "رمز 9")
sym10 = input.symbol("AVGO", "رمز 10")

theTF = tf == "" ? timeframe.period : tf

// --- الرمز 1 ---
t1 = request.security(sym1, theTF, tema(close, len))
s1 = request.security(sym1, theTF, ta.sma(close, len))
b1 = ta.crossover(t1, s1)
s1d = ta.crossunder(t1, s1)
b1 := confirmOnClose ? b1 and barstate.isconfirmed : b1
s1d := confirmOnClose ? s1d and barstate.isconfirmed : s1d

// --- الرمز 2 ---
t2 = request.security(sym2, theTF, tema(close, len))
s2 = request.security(sym2, theTF, ta.sma(close, len))
b2 = ta.crossover(t2, s2)
s2d = ta.crossunder(t2, s2)
b2 := confirmOnClose ? b2 and barstate.isconfirmed : b2
s2d := confirmOnClose ? s2d and barstate.isconfirmed : s2d

// --- الرمز 3 ---
t3 = request.security(sym3, theTF, tema(close, len))
s3 = request.security(sym3, theTF, ta.sma(close, len))
b3 = ta.crossover(t3, s3)
s3d = ta.crossunder(t3, s3)
b3 := confirmOnClose ? b3 and barstate.isconfirmed : b3
s3d := confirmOnClose ? s3d and barstate.isconfirmed : s3d

// --- الرمز 4 ---
t4 = request.security(sym4, theTF, tema(close, len))
s4 = request.security(sym4, theTF, ta.sma(close, len))
b4 = ta.crossover(t4, s4)
s4d = ta.crossunder(t4, s4)
b4 := confirmOnClose ? b4 and barstate.isconfirmed : b4
s4d := confirmOnClose ? s4d and barstate.isconfirmed : s4d

// --- الرمز 5 ---
t5 = request.security(sym5, theTF, tema(close, len))
s5 = request.security(sym5, theTF, ta.sma(close, len))
b5 = ta.crossover(t5, s5)
s5d = ta.crossunder(t5, s5)
b5 := confirmOnClose ? b5 and barstate.isconfirmed : b5
s5d := confirmOnClose ? s5d and barstate.isconfirmed : s5d

// --- الرمز 6 ---
t6 = request.security(sym6, theTF, tema(close, len))
s6 = request.security(sym6, theTF, ta.sma(close, len))
b6 = ta.crossover(t6, s6)
s6d = ta.crossunder(t6, s6)
b6 := confirmOnClose ? b6 and barstate.isconfirmed : b6
s6d := confirmOnClose ? s6d and barstate.isconfirmed : s6d

// --- الرمز 7 ---
t7 = request.security(sym7, theTF, tema(close, len))
s7 = request.security(sym7, theTF, ta.sma(close, len))
b7 = ta.crossover(t7, s7)
s7d = ta.crossunder(t7, s7)
b7 := confirmOnClose ? b7 and barstate.isconfirmed : b7
s7d := confirmOnClose ? s7d and barstate.isconfirmed : s7d

// --- الرمز 8 ---
t8 = request.security(sym8, theTF, tema(close, len))
s8 = request.security(sym8, theTF, ta.sma(close, len))
b8 = ta.crossover(t8, s8)
s8d = ta.crossunder(t8, s8)
b8 := confirmOnClose ? b8 and barstate.isconfirmed : b8
s8d := confirmOnClose ? s8d and barstate.isconfirmed : s8d

// --- الرمز 9 ---
t9 = request.security(sym9, theTF, tema(close, len))
s9 = request.security(sym9, theTF, ta.sma(close, len))
b9 = ta.crossover(t9, s9)
s9d = ta.crossunder(t9, s9)
b9 := confirmOnClose ? b9 and barstate.isconfirmed : b9
s9d := confirmOnClose ? s9d and barstate.isconfirmed : s9d

// --- الرمز 10 ---
t10 = request.security(sym10, theTF, tema(close, len))
s10 = request.security(sym10, theTF, ta.sma(close, len))
b10 = ta.crossover(t10, s10)
s10d = ta.crossunder(t10, s10)
b10 := confirmOnClose ? b10 and barstate.isconfirmed : b10
s10d := confirmOnClose ? s10d and barstate.isconfirmed : s10d

// إجمالي الإشارات عبر القائمة
anyBull = b1 or b2 or b3 or b4 or b5 or b6 or b7 or b8 or b9 or b10
anyBear = s1d or s2d or s3d or s4d or s5d or s6d or s7d or s8d or s9d or s10d

// الإشارة النهائية
signal = anyBull ? 1 : anyBear ? -1 : 0
plot(signal, title="Signal (+1 bull / -1 bear / 0 none)", style=plot.style_stepline, linewidth=2)

// تنبيهات
alertcondition(anyBull, title="TEMA Bullish Cross (Any in list)", message="تقاطع TEMA إيجابي في واحد أو أكثر من الرموز.")
alertcondition(anyBear, title="TEMA Bearish Cross (Any in list)", message="تقاطع TEMA سلبي في واحد أو أكثر من الرموز.")

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.