//@version=5
strategy(title="3-Bar-Reversal-Pattern Strategy", shorttitle="3-Bar-Reversal2", overlay = true)
pos = if(close[0] > close[3] and low[0] > low[3] or close[0] > close[3] and low[0] < low[2], 1)
if(close[0] < close[3] and low[0] < low[3] or close[0] < close[3] and low[0] > low[2], -1, nz(pos[1], 0)))
barcolor (pos == -1 ? red: pos == 1 ? green : blue )
line 14: Mismatched input ',' expecting ')'.
This is line 14
pos = if(close[0] > close[3] and low[0] > low[3] or close[0] > close[3] and low[0] < low[2], 1)
Am I missing a comma or bracket?