// Highlight the trend on the background (green for uptrend, red for downtrend) bgcolor(isUptrend ? color.new(color.green, 90) : isDowntrend ? color.new(color.red, 90) : na)
// Alerts for Buy/Sell Signals alertcondition(buySignal, title="Buy Signal Alert", message="Buy Signal Detected: Price has broken above resistance in an uptrend.") alertcondition(sellSignal, title="Sell Signal Alert", message="Sell Signal Detected: Price has broken below support in a downtrend.")