我无法解决这个问题。我只是希望,而不是像要指出的那样,要补充一下,需要有5条打开和关闭的柱线,在彼此的闭合线/芯线上方。
我确定这是可能的:有人可以伸出援手吗?
//Modified script, orginal by Robert Nance 060915
study(title="Price above/below MA", shorttitle="Above/ Below 21MA", overlay=false)
len = input(200, minval=1, title="Length")
src = input(close, title="Source")
out = ema(src, len)
below = barssince(close >= out)
above = barssince(close <= out)
plot(above, title="Buy", style=area, color=lime)
plot(-below, title="Buy", style=area, color=red)