// Plot Buy Signal as Arrow on Chart plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal Arrow")
// Inputs for CCI length = input.int(14, title="CCI Length") src = input.source(close, title="Source")
// Calculate CCI cci = ta.cci(src, length) prev_cci = ta.valuewhen(bar_index > 0, cci[1], 0)
// Buy condition buySignal = (prev_cci < -200) and (cci > prev_cci) and (cci > -200)
// Plot Buy Signal as Arrow on Chart plotshape(buySignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal Arrow")