// Inputs bbLength = input.int(20, title="Bollinger Band Length") bbMult = input.float(2.0, title="Bollinger Band Multiplier")
// Bollinger Bands Calculation basis = ta.sma(close, bbLength) dev = ta.stdev(close, bbLength) upperBB = basis + bbMult * dev lowerBB = basis - bbMult * dev
// Candle Type Detection isDoji = math.abs(close - open) <= (high - low) * 0.1 // Small body (10% of total range) isShootingStar = (high - math.max(open, close)) >= (high - low) * 0.6 and (math.min(open, close) - low) <= (high - low) * 0.2 // Long upper wick, small lower wick
// Conditions for Parabolic Move parabolicMove1 = close > upperBB parabolicMove2 = close[1] > upperBB parabolicMove3 = close[2] > upperBB threeParabolicCandles = parabolicMove1 and parabolicMove2 and parabolicMove3
// Reversal Candle Detection reversalCandle = (isDoji or isShootingStar) and close > upperBB // Doji or Shooting Star near upper BB
// Final Signal signal = threeParabolicCandles and reversalCandle
// Plot Signal on Chart plotshape(signal, title="Reversal Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Reversal")
// Alerts if signal alert("Reversal Signal: 3 parabolic candles followed by a Doji or Shooting Star near the upper Bollinger Band.", alert.freq_once_per_bar_close)