//@version=5
indicator("Next Candle Prediction (Simple & Clean)", overlay=true)
// === BASIC CANDLE PATTERN SETUPS ===
bullish = close > open and close[1] < open[1] and close > open[1]
bearish = close < open and close[1] > open[1] and close < open[1]
// === VOLUME CONFIRMATION ===
volAvg = ta.sma(volume, 20)
volStrong = volume > volAvg
// === FINAL CONDITIONS ===
nextCandleUp = bullish and volStrong
nextCandleDown = bearish and volStrong
// === PLOTTING SIGNALS ===
plotshape(nextCandleUp, location=location.belowbar, color=color.green,
style=shape.triangleup, size=size.small, title="BUY")
plotshape(nextCandleDown, location=location.abovebar, color=color.red,
style=shape.triangledown, size=size.small, title="SELL")
// === ALERTS ===
alertcondition(nextCandleUp, title="Next Candle UP", message="Next candle is likely
to go UP!")
alertcondition(nextCandleDown, title="Next Candle DOWN", message="Next candle is
likely to go DOWN!")