PROTECTED SOURCE SCRIPT
Altangadas

//version=5
indicator("VWAP/MVWAP/EMA Suite + Strong MACD Filter", overlay = true)
// --- 1. Signal & Filter Settings ---
vwapLength = input.int(1, title="VWAP Length")
emaLength1 = input.int(7, title="Signal EMA 1 (7)")
emaLength2 = input.int(25, title="Signal EMA 2 (25)")
mvwapLength = input.int(21, title="MVWAP Length")
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- MACD Settings ---
fastLength = input.int(12, title="MACD Fast Length")
slowLength = input.int(26, title="MACD Slow Length")
signalSmoothing = input.int(9, title="MACD Signal Smoothing")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
// MACD Calculation
[macdLine, signalLine, hist] = ta.macd(close, fastLength, slowLength, signalSmoothing)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
ema800 = ta.ema(close, 800)
// --- Plotting Lines ---
plot(cvwap, color=color.blue, linewidth=2, title="VWAP", style=plot.style_linebr)
plot(mvwap, color=color.fuchsia, linewidth=2, title="MVWAP", style=plot.style_linebr)
plot(ema1, color=color.new(color.yellow, 50), title="EMA 7")
plot(ema2, color=color.new(color.orange, 50), title="EMA 25")
plot(ema50, color=color.green, linewidth=1, title="EMA 50")
plot(ema100, color=color.blue, linewidth=1, title="EMA 100")
plot(ema200, color=color.gray, linewidth=2, title="EMA 200")
plot(ema800, color=color.yellow, linewidth=4, title="EMA 800")
// --- Strong MACD Logic (Тод өнгөний логик) ---
// Bullish Histogram 0-ээс дээш БӨГӨӨД өмнөхөөсөө өссөн байх (Тод ногоон)
strongBullish = hist > 0 and hist > hist[1]
// Bearish Histogram 0-ээс доош БӨГӨӨД өмнөхөөсөө буурсан байх (Тод улаан)
strongBearish = hist < 0 and hist < hist[1]
// --- Signal Logic ---
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Trigger: Огтлолцол + Хүчтэй Momentum (Тод өнгө) + RSI шүүлтүүр
longTrigger = longCond and not longCond[1] and strongBullish and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond[1] and strongBearish and (rsiValue > (100 - rsiLimit))
// --- Tiny Signals ---
plotshape(longTrigger, title="L", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="L")
plotshape(shortTrigger, title="S", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="S")
// --- Alerts ---
alertcondition(longTrigger, title="Long Strong MACD", message="XAUUSD: LONG (Strong MACD Confirmation)")
alertcondition(shortTrigger, title="Short Strong MACD", message="XAUUSD: SHORT (Strong MACD Confirmation)")
indicator("VWAP/MVWAP/EMA Suite + Strong MACD Filter", overlay = true)
// --- 1. Signal & Filter Settings ---
vwapLength = input.int(1, title="VWAP Length")
emaLength1 = input.int(7, title="Signal EMA 1 (7)")
emaLength2 = input.int(25, title="Signal EMA 2 (25)")
mvwapLength = input.int(21, title="MVWAP Length")
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- MACD Settings ---
fastLength = input.int(12, title="MACD Fast Length")
slowLength = input.int(26, title="MACD Slow Length")
signalSmoothing = input.int(9, title="MACD Signal Smoothing")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
// MACD Calculation
[macdLine, signalLine, hist] = ta.macd(close, fastLength, slowLength, signalSmoothing)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
ema800 = ta.ema(close, 800)
// --- Plotting Lines ---
plot(cvwap, color=color.blue, linewidth=2, title="VWAP", style=plot.style_linebr)
plot(mvwap, color=color.fuchsia, linewidth=2, title="MVWAP", style=plot.style_linebr)
plot(ema1, color=color.new(color.yellow, 50), title="EMA 7")
plot(ema2, color=color.new(color.orange, 50), title="EMA 25")
plot(ema50, color=color.green, linewidth=1, title="EMA 50")
plot(ema100, color=color.blue, linewidth=1, title="EMA 100")
plot(ema200, color=color.gray, linewidth=2, title="EMA 200")
plot(ema800, color=color.yellow, linewidth=4, title="EMA 800")
// --- Strong MACD Logic (Тод өнгөний логик) ---
// Bullish Histogram 0-ээс дээш БӨГӨӨД өмнөхөөсөө өссөн байх (Тод ногоон)
strongBullish = hist > 0 and hist > hist[1]
// Bearish Histogram 0-ээс доош БӨГӨӨД өмнөхөөсөө буурсан байх (Тод улаан)
strongBearish = hist < 0 and hist < hist[1]
// --- Signal Logic ---
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Trigger: Огтлолцол + Хүчтэй Momentum (Тод өнгө) + RSI шүүлтүүр
longTrigger = longCond and not longCond[1] and strongBullish and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond[1] and strongBearish and (rsiValue > (100 - rsiLimit))
// --- Tiny Signals ---
plotshape(longTrigger, title="L", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="L")
plotshape(shortTrigger, title="S", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="S")
// --- Alerts ---
alertcondition(longTrigger, title="Long Strong MACD", message="XAUUSD: LONG (Strong MACD Confirmation)")
alertcondition(shortTrigger, title="Short Strong MACD", message="XAUUSD: SHORT (Strong MACD Confirmation)")
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Geschütztes Skript
Dieses Script ist als Closed-Source veröffentlicht. Sie können es kostenlos und ohne Einschränkungen verwenden – erfahren Sie hier mehr.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.