OPEN-SOURCE SCRIPT
SUPER TREND + RSI FILTER PRO

version=5
indicator("SUPER TREND + RSI FILTER PRO", overlay=true, timeframe="", timeframe_gaps=true)
//---------------------------
// INPUTS
//---------------------------
factor = input.float(3.0, "SuperTrend Factor")
atr_len = input.int(10, "ATR Length")
rsi_len = input.int(14, "RSI Length")
rsi_buy = input.int(50, "RSI Buy Level")
rsi_sell = input.int(50, "RSI Sell Level")
//---------------------------
// SUPERTREND CALCULATION
//---------------------------
atr = ta.atr(atr_len)
upperBand = close + factor * atr
lowerBand = close - factor * atr
trend = 0.0
trend := close > nz(trend[1]) ? math.max(lowerBand, nz(trend[1])) : math.min(upperBand, nz(trend[1]))
// Coloration
bull = close > trend
bear = close < trend
//---------------------------
// RSI FILTER
//---------------------------
rsi = ta.rsi(close, rsi_len)
//---------------------------
// BUY & SELL SIGNALS
//---------------------------
buySignal = bull and rsi > rsi_buy and close > trend
sellSignal = bear and rsi < rsi_sell and close < trend
//---------------------------
// PLOT SUPERTREND
//---------------------------
plot(trend, color=bull ? color.green : color.red, linewidth=2, title="SuperTrend")
//---------------------------
// BUY / SELL MARKERS
//---------------------------
plotshape(buySignal, title="Buy", style=shape.labelup, color=color.green, size=size.small, text="BUY")
plotshape(sellSignal, title="Sell", style=shape.labeldown, color=color.red, size=size.small, text="SELL")
//---------------------------
// ALERTS
//---------------------------
alertcondition(buySignal, title="Buy Signal", message="BUY Signal - SuperTrend + RSI Filter")
alertcondition(sellSignal, title="Sell Signal", message="SELL Signal - SuperTrend + RSI Filter")
indicator("SUPER TREND + RSI FILTER PRO", overlay=true, timeframe="", timeframe_gaps=true)
//---------------------------
// INPUTS
//---------------------------
factor = input.float(3.0, "SuperTrend Factor")
atr_len = input.int(10, "ATR Length")
rsi_len = input.int(14, "RSI Length")
rsi_buy = input.int(50, "RSI Buy Level")
rsi_sell = input.int(50, "RSI Sell Level")
//---------------------------
// SUPERTREND CALCULATION
//---------------------------
atr = ta.atr(atr_len)
upperBand = close + factor * atr
lowerBand = close - factor * atr
trend = 0.0
trend := close > nz(trend[1]) ? math.max(lowerBand, nz(trend[1])) : math.min(upperBand, nz(trend[1]))
// Coloration
bull = close > trend
bear = close < trend
//---------------------------
// RSI FILTER
//---------------------------
rsi = ta.rsi(close, rsi_len)
//---------------------------
// BUY & SELL SIGNALS
//---------------------------
buySignal = bull and rsi > rsi_buy and close > trend
sellSignal = bear and rsi < rsi_sell and close < trend
//---------------------------
// PLOT SUPERTREND
//---------------------------
plot(trend, color=bull ? color.green : color.red, linewidth=2, title="SuperTrend")
//---------------------------
// BUY / SELL MARKERS
//---------------------------
plotshape(buySignal, title="Buy", style=shape.labelup, color=color.green, size=size.small, text="BUY")
plotshape(sellSignal, title="Sell", style=shape.labeldown, color=color.red, size=size.small, text="SELL")
//---------------------------
// ALERTS
//---------------------------
alertcondition(buySignal, title="Buy Signal", message="BUY Signal - SuperTrend + RSI Filter")
alertcondition(sellSignal, title="Sell Signal", message="SELL Signal - SuperTrend + RSI Filter")
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.