OPEN-SOURCE SCRIPT
ROC / VWAP / ATR / RSI / MACD Combo

//version=5
indicator("ROC / VWAP / ATR / RSI / MACD Combo", overlay=true)
// === INPUTS ===
showROC = input.bool(true, "Show ROC")
rocLength = input.int(14, "ROC Length")
showVWAP = input.bool(true, "Show VWAP")
showATR = input.bool(true, "Show ATR")
atrLength = input.int(14, "ATR Length")
showRSI = input.bool(true, "Show RSI")
rsiLength = input.int(14, "RSI Length")
showMACD = input.bool(true, "Show MACD")
fastLen = input.int(12, "MACD Fast Length")
slowLen = input.int(26, "MACD Slow Length")
sigLen = input.int(9, "MACD Signal Length")
// === CALCULATIONS ===
// ROC
roc = ta.roc(close, rocLength)
// VWAP
vwap = ta.vwap
// ATR
atr = ta.atr(atrLength)
// RSI
rsi = ta.rsi(close, rsiLength)
// MACD
macdLine = ta.ema(close, fastLen) - ta.ema(close, slowLen)
signal = ta.ema(macdLine, sigLen)
hist = macdLine - signal
// === PLOTTING ===
// ROC (separate scale)
plot(showROC ? roc : na, title="ROC", color=color.aqua, display=display.none)
// VWAP (on chart)
plot(showVWAP ? vwap : na, title="VWAP", color=color.orange, linewidth=2)
// ATR (separate scale)
plot(showATR ? atr : na, title="ATR", color=color.red, display=display.none)
// RSI (separate scale, 0-100)
plot(showRSI ? rsi : na, title="RSI", color=color.blue, display=display.none)
hline(70, "RSI Overbought", color=color.gray, linestyle=hline.style_dotted)
hline(30, "RSI Oversold", color=color.gray, linestyle=hline.style_dotted)
// MACD (separate scale)
plot(showMACD ? macdLine : na, title="MACD Line", color=color.green, display=display.none)
plot(showMACD ? signal : na, title="Signal Line", color=color.red, display=display.none)
plot(showMACD ? hist : na, title="MACD Histogram", style=plot.style_columns, color=hist>=0 ? color.new(color.green,50) : color.new(color.red,50), display=display.none)
indicator("ROC / VWAP / ATR / RSI / MACD Combo", overlay=true)
// === INPUTS ===
showROC = input.bool(true, "Show ROC")
rocLength = input.int(14, "ROC Length")
showVWAP = input.bool(true, "Show VWAP")
showATR = input.bool(true, "Show ATR")
atrLength = input.int(14, "ATR Length")
showRSI = input.bool(true, "Show RSI")
rsiLength = input.int(14, "RSI Length")
showMACD = input.bool(true, "Show MACD")
fastLen = input.int(12, "MACD Fast Length")
slowLen = input.int(26, "MACD Slow Length")
sigLen = input.int(9, "MACD Signal Length")
// === CALCULATIONS ===
// ROC
roc = ta.roc(close, rocLength)
// VWAP
vwap = ta.vwap
// ATR
atr = ta.atr(atrLength)
// RSI
rsi = ta.rsi(close, rsiLength)
// MACD
macdLine = ta.ema(close, fastLen) - ta.ema(close, slowLen)
signal = ta.ema(macdLine, sigLen)
hist = macdLine - signal
// === PLOTTING ===
// ROC (separate scale)
plot(showROC ? roc : na, title="ROC", color=color.aqua, display=display.none)
// VWAP (on chart)
plot(showVWAP ? vwap : na, title="VWAP", color=color.orange, linewidth=2)
// ATR (separate scale)
plot(showATR ? atr : na, title="ATR", color=color.red, display=display.none)
// RSI (separate scale, 0-100)
plot(showRSI ? rsi : na, title="RSI", color=color.blue, display=display.none)
hline(70, "RSI Overbought", color=color.gray, linestyle=hline.style_dotted)
hline(30, "RSI Oversold", color=color.gray, linestyle=hline.style_dotted)
// MACD (separate scale)
plot(showMACD ? macdLine : na, title="MACD Line", color=color.green, display=display.none)
plot(showMACD ? signal : na, title="Signal Line", color=color.red, display=display.none)
plot(showMACD ? hist : na, title="MACD Histogram", style=plot.style_columns, color=hist>=0 ? color.new(color.green,50) : color.new(color.red,50), display=display.none)
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
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.