OPEN-SOURCE SCRIPT
My script

// version=5 indicator("Custom LuxAlgo-Style Levels", overlay=true, max_lines_count=500)
// --- Trend Detection (EMA Based) fastEMA = ta.ema(close, 9) slowEMA = ta.ema(close, 21) trendUp = fastEMA > slowEMA trendDown = fastEMA < slowEMA
plot(fastEMA, title="Fast EMA", color=color.new(color.blue, 0)) plot(slowEMA, title="Slow EMA", color=color.new(color.orange, 0))
// --- Buy / Sell Signals buySignal = trendUp and ta.crossover(fastEMA, slowEMA) sellSignal = trendDown and ta.crossunder(fastEMA, slowEMA)
plotshape(buySignal, title="Buy", style=shape.labelup, color=color.new(color.green,0), size=size.small, text="BUY") plotshape(sellSignal, title="Sell", style=shape.labeldown, color=color.new(color.red,0), size=size.small, text="SELL")
// --- Auto Support & Resistance length = 20 sup = ta.lowest(length) res = ta.highest(length)
plot(sup, title="Support", color=color.new(color.green,70), linewidth=2) plot(res, title="Resistance", color=color.new(color.red,70), linewidth=2)
// --- Market Structure (Simple Swing High/Low) sh = ta.highest(high, 5) == high sl = ta.lowest(low, 5) == low
plotshape(sh, title="Swing High", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny) plotshape(sl, title="Swing Low", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.tiny)
// --- Alerts alertcondition(buySignal, "Buy Signal", "Trend Buy Signal Detected") alertcondition(sellSignal, "Sell Signal", "Trend Sell Signal Detected")
// --- Trend Detection (EMA Based) fastEMA = ta.ema(close, 9) slowEMA = ta.ema(close, 21) trendUp = fastEMA > slowEMA trendDown = fastEMA < slowEMA
plot(fastEMA, title="Fast EMA", color=color.new(color.blue, 0)) plot(slowEMA, title="Slow EMA", color=color.new(color.orange, 0))
// --- Buy / Sell Signals buySignal = trendUp and ta.crossover(fastEMA, slowEMA) sellSignal = trendDown and ta.crossunder(fastEMA, slowEMA)
plotshape(buySignal, title="Buy", style=shape.labelup, color=color.new(color.green,0), size=size.small, text="BUY") plotshape(sellSignal, title="Sell", style=shape.labeldown, color=color.new(color.red,0), size=size.small, text="SELL")
// --- Auto Support & Resistance length = 20 sup = ta.lowest(length) res = ta.highest(length)
plot(sup, title="Support", color=color.new(color.green,70), linewidth=2) plot(res, title="Resistance", color=color.new(color.red,70), linewidth=2)
// --- Market Structure (Simple Swing High/Low) sh = ta.highest(high, 5) == high sl = ta.lowest(low, 5) == low
plotshape(sh, title="Swing High", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny) plotshape(sl, title="Swing Low", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.tiny)
// --- Alerts alertcondition(buySignal, "Buy Signal", "Trend Buy Signal Detected") alertcondition(sellSignal, "Sell Signal", "Trend Sell Signal Detected")
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.