OPEN-SOURCE SCRIPT
Altangadas Megad

//version=5
indicator("VWAP/MVWAP/EMA Precise Final", overlay = true)
// --- 1. Signal Settings ---
vwapLength = input.int(1, title="VWAP Length", minval=1)
emaLength1 = input.int(7, title="Signal EMA 1 (7)", minval=1)
emaLength2 = input.int(25, title="Signal EMA 2 (25)", minval=1)
mvwapLength = input.int(21, title="MVWAP Length", minval=1)
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- 2. Trend EMA Settings ---
ema50Length = input.int(50, title="Trend EMA 50")
ema100Length = input.int(100, title="Trend EMA 100")
ema200Length = input.int(200, title="Trend EMA 200")
ema800Length = input.int(800, title="Institutional EMA 800")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, ema50Length)
ema100 = ta.ema(close, ema100Length)
ema200 = ta.ema(close, ema200Length)
ema800 = ta.ema(close, ema800Length)
// --- 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")
// --- Signal Logic (Анхны огтлолцол дээр нэг удаа сигнал өгөх) ---
// LONG: EMA болон VWAP бүгд MVWAP-аас дээш гарахад
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
// SHORT: EMA болон VWAP бүгд MVWAP-аас доош ороход
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Зөвхөн төлөв өөрчлөгдөх мөчийг барих
longTrigger = longCond and not longCond[1] and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond[1] 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 Alert", message="XAUUSD: LONG!")
alertcondition(shortTrigger, title="Short Alert", message="XAUUSD: SHORT!")
indicator("VWAP/MVWAP/EMA Precise Final", overlay = true)
// --- 1. Signal Settings ---
vwapLength = input.int(1, title="VWAP Length", minval=1)
emaLength1 = input.int(7, title="Signal EMA 1 (7)", minval=1)
emaLength2 = input.int(25, title="Signal EMA 2 (25)", minval=1)
mvwapLength = input.int(21, title="MVWAP Length", minval=1)
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- 2. Trend EMA Settings ---
ema50Length = input.int(50, title="Trend EMA 50")
ema100Length = input.int(100, title="Trend EMA 100")
ema200Length = input.int(200, title="Trend EMA 200")
ema800Length = input.int(800, title="Institutional EMA 800")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, ema50Length)
ema100 = ta.ema(close, ema100Length)
ema200 = ta.ema(close, ema200Length)
ema800 = ta.ema(close, ema800Length)
// --- 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")
// --- Signal Logic (Анхны огтлолцол дээр нэг удаа сигнал өгөх) ---
// LONG: EMA болон VWAP бүгд MVWAP-аас дээш гарахад
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
// SHORT: EMA болон VWAP бүгд MVWAP-аас доош ороход
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Зөвхөн төлөв өөрчлөгдөх мөчийг барих
longTrigger = longCond and not longCond[1] and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond[1] 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 Alert", message="XAUUSD: LONG!")
alertcondition(shortTrigger, title="Short Alert", message="XAUUSD: SHORT!")
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.