OPEN-SOURCE SCRIPT
Diupdate

Multi-Candle Reversal Confirmation

79
Multi-Candle Reversal Confirmation (MCRC)
This indicator identifies potential price reversals using a 3-candle confirmation pattern. It filters out noise by requiring a significant prior trend before signaling, helping you catch turning points rather than getting trapped in choppy price action.
How It Works
The indicator uses a three-step process to confirm reversals:

Candle 1 (Rejection) - Detects a rejection candle after a sustained move. This includes hammer/shooting star patterns with long wicks, doji candles showing indecision, or stall candles with unusually small bodies.
Candle 2 (Reversal) - Confirms the candle closes in the opposite direction of the prior trend.
Candle 3 (Confirmation) - Validates the reversal by either continuing in the new direction or breaking the high/low of the previous candle.

Key Features

Requires a significant prior trend before looking for reversals (no signals in choppy, sideways markets)
Uses ATR to measure move significance, adapting to current volatility
Marks rejection candles with small circles for early awareness
Confirmed signals shown as triangles with Bull/Bear labels
Built-in alerts for all signal types

Settings

Wick to Body Ratio - How pronounced the rejection wick must be compared to the candle body (default: 2.0)
Doji Threshold - Maximum body size relative to total range to qualify as a doji (default: 0.1)
Trend Lookback - Number of candles to analyze for prior trend detection (default: 5)
Trend Strength - Percentage of lookback candles required in trend direction (default: 0.6 = 60%)
Minimum Move (ATR multiple) - How large the prior move must be before signaling (default: 1.5)
Show Bullish/Bearish - Toggle each signal type on or off

Visual Signals

Small Circle - Marks potential rejection candles (first candle in the pattern)
Green Triangle (Bull) - Confirmed bullish reversal signal
Red Triangle (Bear) - Confirmed bearish reversal signal

Alerts
Three alert options are available:

Bullish Reversal Confirmed
Bearish Reversal Confirmed
Any Reversal Confirmed

How To Set Up Alerts

Add the indicator to your chart
Right-click on the chart and select "Add Alert" (or press Alt+A)
In the Condition dropdown, select "Multi-Candle Reversal Confirmation"
Choose your preferred alert type
Set notification preferences (popup, email, sound, webhook)
Click "Create"

Tips For Best Results

Combine with key support/resistance levels for higher probability trades
Use higher timeframe trend direction as a filter
Adjust Trend Lookback based on your timeframe (higher for longer timeframes)
Increase Minimum Move ATR in volatile conditions to reduce false signals
Signals appearing near VWAP, moving averages, or prior day levels tend to be more reliable

Note: This indicator is for informational purposes only and should not be used as the sole basis for trading decisions. Always use proper risk management and consider combining with other forms of analysis.
Catatan Rilis
//version=6
indicator(title="Reversal Confirmation", shorttitle="RC", overlay=true)

// Inputs
trendLookback = input.int(7, minval=3, maxval=20, title="Trend Lookback", tooltip="Number of candles to look back to confirm a prior trend")
trendStrength = input.float(0.7, minval=0.5, maxval=1.0, step=0.1, title="Trend Strength", tooltip="Percentage of lookback candles that must be in trend direction")
minMoveATR = input.float(2.0, minval=0.5, maxval=5.0, step=0.5, title="Minimum Move (ATR multiple)", tooltip="Minimum price move required before looking for reversal")
showBullish = input.bool(true, title="Show Bullish Reversals")
showBearish = input.bool(true, title="Show Bearish Reversals")
showReversalCandle = input.bool(true, title="Mark Reversal Candles")

// ATR for measuring move size
atr = ta.atr(14)

// Candle calculations
isGreenCandle = close > open
isRedCandle = close < open

// Count trend candles in lookback period
var int greenCount = 0
var int redCount = 0
greenCount := 0
redCount := 0

for i = 1 to trendLookback
if close > open
greenCount += 1
else if close < open
redCount += 1

// Determine if there was a prior trend
priorUptrend = greenCount >= trendLookback * trendStrength
priorDowntrend = redCount >= trendLookback * trendStrength

// Measure the size of the prior move
highestHigh = ta.highest(high, trendLookback)
lowestLow = ta.lowest(low, trendLookback)
priorMove = highestHigh - lowestLow

// Check if move is significant enough
significantUpMove = priorUptrend and priorMove > atr * minMoveATR
significantDownMove = priorDowntrend and priorMove > atr * minMoveATR

// Reversal Candle (R) - First candle in opposite direction after a trend
bullishReversalCandle = significantDownMove and isGreenCandle
bearishReversalCandle = significantUpMove and isRedCandle

// Confirmation Candle (C) - Eclipses the close of the reversal candle
// Bullish: Close of confirmation candle is ABOVE close of reversal candle
// Bearish: Close of confirmation candle is BELOW close of reversal candle
bullishConfirmation = bullishReversalCandle[1] and close > close[1]
bearishConfirmation = bearishReversalCandle[1] and close < close[1]

// Plot Reversal Candles (R)
plotshape(showReversalCandle and showBullish and bullishReversalCandle, title="Bullish Reversal Candle", location=location.belowbar, style=shape.circle, size=size.tiny, color=color.new(#00c853, 40), text="R", textcolor=color.new(#00c853, 40))
plotshape(showReversalCandle and showBearish and bearishReversalCandle, title="Bearish Reversal Candle", location=location.abovebar, style=shape.circle, size=size.tiny, color=color.new(#ff1744, 40), text="R", textcolor=color.new(#ff1744, 40))

// Plot Confirmation Candles (C)
plotshape(showBullish and bullishConfirmation, title="Bullish Confirmation", location=location.belowbar, style=shape.triangleup, size=size.normal, color=color.new(#00c853, 0), text="C", textcolor=color.new(#00c853, 0))
plotshape(showBearish and bearishConfirmation, title="Bearish Confirmation", location=location.abovebar, style=shape.triangledown, size=size.normal, color=color.new(#ff1744, 0), text="C", textcolor=color.new(#ff1744, 0))

// Draw line at reversal candle close level (optional visual reference)
var line bullishLine = na
var line bearishLine = na

if bullishReversalCandle
bullishLine := line.new(bar_index, close, bar_index + 2, close, color=color.new(#00c853, 50), style=line.style_dashed, width=1)

if bearishReversalCandle
bearishLine := line.new(bar_index, close, bar_index + 2, close, color=color.new(#ff1744, 50), style=line.style_dashed, width=1)

// Alert conditions
alertcondition(bullishConfirmation, title="Bullish Confirmation", message="Bullish reversal confirmed - candle eclipsed reversal close")
alertcondition(bearishConfirmation, title="Bearish Confirmation", message="Bearish reversal confirmed - candle eclipsed reversal close")
alertcondition(bullishConfirmation or bearishConfirmation, title="Any Confirmation", message="Reversal confirmed - candle eclipsed reversal close")

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.