OPEN-SOURCE SCRIPT
Multi-Condition Alert System d

//version=5
indicator("Multi-Condition Alert System", shorttitle="MC Alert", overlay=false)
// Timeframe check - Set to 10 minutes
isCorrectTF = timeframe.isintraday and timeframe.multiplier == 10
// EMA Calculations
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
// MACD Calculations
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
// RSI Calculations
rsiValue = ta.rsi(close, 14)
// Define RSI levels (you can adjust these based on your violet/yellow lines)
// Assuming violet is above 50 and yellow is below 50
rsiVioletLevel = 50 // Adjust based on your actual levels
rsiYellowLevel = 50 // Adjust based on your actual levels
// Conditions
emaCondition = ema9 > ema21 and ema9 > ema50
macdCondition = macdLine > signalLine
rsiCondition = rsiValue > rsiVioletLevel and rsiValue > rsiYellowLevel
// All conditions must be true
buySignal = emaCondition and macdCondition and rsiCondition and isCorrectTF
// Plotting for visualization
plot(ema9, color=color.blue, title="EMA 9")
plot(ema21, color=color.orange, title="EMA 21")
plot(ema50, color=color.red, title="EMA 50")
plot(macdLine, color=color.blue, title="MACD Line", style=plot.style_line)
plot(signalLine, color=color.orange, title="Signal Line", style=plot.style_line)
hline(rsiVioletLevel, "RSI Violet Level", color=color.purple)
hline(rsiYellowLevel, "RSI Yellow Level", color=color.yellow)
plot(rsiValue, color=color.white, title="RSI")
// Plot buy signals
plotshape(buySignal ? 1 : na, title="Buy Signal", location=location.bottom,
color=color.green, style=shape.triangleup, size=size.small)
// Alert condition
if buySignal
alert("BUY SIGNAL: EMA 9 > EMA 21 & 50, MACD blue > orange, RSI above levels", alert.freq_once_per_bar)
// Table display
var table signalTable = table.new(position.top_right, 1, 5, bgcolor=color.black,
border_width=1)
if barstate.islast
table.cell(signalTable, 0, 0, "10min TF Check:",
text_color=isCorrectTF ? color.green : color.red)
table.cell(signalTable, 0, 1, "EMA 9 > 21 & 50:",
text_color=emaCondition ? color.green : color.red)
table.cell(signalTable, 0, 2, "MACD Blue > Orange:",
text_color=macdCondition ? color.green : color.red)
table.cell(signalTable, 0, 3, "RSI Condition:",
text_color=rsiCondition ? color.green : color.red)
table.cell(signalTable, 0, 4, "BUY SIGNAL:",
text_color=buySignal ? color.green : color.red)
indicator("Multi-Condition Alert System", shorttitle="MC Alert", overlay=false)
// Timeframe check - Set to 10 minutes
isCorrectTF = timeframe.isintraday and timeframe.multiplier == 10
// EMA Calculations
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
// MACD Calculations
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
// RSI Calculations
rsiValue = ta.rsi(close, 14)
// Define RSI levels (you can adjust these based on your violet/yellow lines)
// Assuming violet is above 50 and yellow is below 50
rsiVioletLevel = 50 // Adjust based on your actual levels
rsiYellowLevel = 50 // Adjust based on your actual levels
// Conditions
emaCondition = ema9 > ema21 and ema9 > ema50
macdCondition = macdLine > signalLine
rsiCondition = rsiValue > rsiVioletLevel and rsiValue > rsiYellowLevel
// All conditions must be true
buySignal = emaCondition and macdCondition and rsiCondition and isCorrectTF
// Plotting for visualization
plot(ema9, color=color.blue, title="EMA 9")
plot(ema21, color=color.orange, title="EMA 21")
plot(ema50, color=color.red, title="EMA 50")
plot(macdLine, color=color.blue, title="MACD Line", style=plot.style_line)
plot(signalLine, color=color.orange, title="Signal Line", style=plot.style_line)
hline(rsiVioletLevel, "RSI Violet Level", color=color.purple)
hline(rsiYellowLevel, "RSI Yellow Level", color=color.yellow)
plot(rsiValue, color=color.white, title="RSI")
// Plot buy signals
plotshape(buySignal ? 1 : na, title="Buy Signal", location=location.bottom,
color=color.green, style=shape.triangleup, size=size.small)
// Alert condition
if buySignal
alert("BUY SIGNAL: EMA 9 > EMA 21 & 50, MACD blue > orange, RSI above levels", alert.freq_once_per_bar)
// Table display
var table signalTable = table.new(position.top_right, 1, 5, bgcolor=color.black,
border_width=1)
if barstate.islast
table.cell(signalTable, 0, 0, "10min TF Check:",
text_color=isCorrectTF ? color.green : color.red)
table.cell(signalTable, 0, 1, "EMA 9 > 21 & 50:",
text_color=emaCondition ? color.green : color.red)
table.cell(signalTable, 0, 2, "MACD Blue > Orange:",
text_color=macdCondition ? color.green : color.red)
table.cell(signalTable, 0, 3, "RSI Condition:",
text_color=rsiCondition ? color.green : color.red)
table.cell(signalTable, 0, 4, "BUY SIGNAL:",
text_color=buySignal ? color.green : color.red)
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.