isRes = high[length] > upper
isSup = low[length] < lower
if isRes and isSup
upSh = high[length] - math.max(open[length]), close[length])
downSh = math.max(open[length]), close[length]) - low[length]
isRes := isRes and upSh > dwSh
isSup := isSup and dwSh > upSh
os := isRes ? 0 : isSup ? 1 : -1
请建议更正输入“upSh”时的语法错误
应该是您使用的变量
dwSh
中的拼写错误 - 因为您将其声明为downSh