OPEN-SOURCE SCRIPT
MC² Pullback Screener v1.01

//version=5
indicator("MC² Pullback Screener v1.01", overlay=false)
//----------------------------------------------------
// 🔹 PARAMETERS
//----------------------------------------------------
lenTrend = input.int(20, "SMA Trend Length")
relVolLookback = input.int(10, "Relative Volume Lookback")
minRelVol = input.float(0.7, "Min Relative Volume on Pullback")
maxSpikeVol = input.float(3.5, "Max Spike Vol (Reject News Bars)")
pullbackBars = input.int(3, "Pullback Lookback Bars")
//----------------------------------------------------
// 🔹 DATA
//----------------------------------------------------
// Moving averages for trend direction
sma20 = ta.sma(close, lenTrend)
sma50 = ta.sma(close, 50)
// Relative Volume
volAvg = ta.sma(volume, relVolLookback)
relVol = volume / volAvg
// Trend condition
uptrend = close > sma20 and sma20 > sma50
//----------------------------------------------------
// 🔹 BREAKOUT + PULLBACK LOGIC
//----------------------------------------------------
// Recent breakout reference
recentHigh = ta.highest(close, 10)
isBreakout = close > recentHigh[1]
// Pullback logic
nearSupport = close > recentHigh[1] * 0.98 and close < recentHigh[1] * 1.02
lowVolPullback = relVol < minRelVol
// Reject single-bar news spike
rejectSpike = relVol > maxSpikeVol
//----------------------------------------------------
// 🔹 ENTRY SIGNAL
//----------------------------------------------------
pullbackSignal = uptrend and lowVolPullback and nearSupport and not rejectSpike
//----------------------------------------------------
// 🔹 SCREENER OUTPUT
//----------------------------------------------------
// Pine Screener expects a plot output
plot(pullbackSignal ? 1 : 0, title="MC² Pullback Signal", style=plot.style_columns, color=pullbackSignal ? color.green : color.black)
indicator("MC² Pullback Screener v1.01", overlay=false)
//----------------------------------------------------
// 🔹 PARAMETERS
//----------------------------------------------------
lenTrend = input.int(20, "SMA Trend Length")
relVolLookback = input.int(10, "Relative Volume Lookback")
minRelVol = input.float(0.7, "Min Relative Volume on Pullback")
maxSpikeVol = input.float(3.5, "Max Spike Vol (Reject News Bars)")
pullbackBars = input.int(3, "Pullback Lookback Bars")
//----------------------------------------------------
// 🔹 DATA
//----------------------------------------------------
// Moving averages for trend direction
sma20 = ta.sma(close, lenTrend)
sma50 = ta.sma(close, 50)
// Relative Volume
volAvg = ta.sma(volume, relVolLookback)
relVol = volume / volAvg
// Trend condition
uptrend = close > sma20 and sma20 > sma50
//----------------------------------------------------
// 🔹 BREAKOUT + PULLBACK LOGIC
//----------------------------------------------------
// Recent breakout reference
recentHigh = ta.highest(close, 10)
isBreakout = close > recentHigh[1]
// Pullback logic
nearSupport = close > recentHigh[1] * 0.98 and close < recentHigh[1] * 1.02
lowVolPullback = relVol < minRelVol
// Reject single-bar news spike
rejectSpike = relVol > maxSpikeVol
//----------------------------------------------------
// 🔹 ENTRY SIGNAL
//----------------------------------------------------
pullbackSignal = uptrend and lowVolPullback and nearSupport and not rejectSpike
//----------------------------------------------------
// 🔹 SCREENER OUTPUT
//----------------------------------------------------
// Pine Screener expects a plot output
plot(pullbackSignal ? 1 : 0, title="MC² Pullback Signal", style=plot.style_columns, color=pullbackSignal ? color.green : color.black)
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.