你能帮我更新这个以使用版本 5 和“买入卖出信号吗?没有 pine 编辑器版本。我正在尝试制作版本 5。我还想添加买入和卖出信号。如果我可以隐藏值为 80 和 20。
study(title = "instagram: askincantum", shorttitle = "instagram: askincantum", overlay = true)
//Mode
RSI = input(title="Line", defval=80, minval=1, maxval = 100)
//RSI
src = close,
ep = 2 * RSI - 1
auc = ema( max( src - src[1], 0 ), ep )
adc = ema( max( src[1] - src, 0 ), ep )
x1 = (RSI - 1) * ( adc * 70 / (100-70) - auc)
ub = iff( x1 >= 0, src + x1, src + x1 * (100-70)/70 )
x2 = (RSI - 1) * ( adc * 30 / (100-30) - auc)
lb = iff( x2 >= 0, src + x2, src + x2 * (100-30)/30 )
//Affichage
plot(avg(ub, lb), color=blue , style = line, linewidth=2, title="Line")
len = input(20, minval=1, title="Entry")
src1 = input(close, title="Source")
offset = input(title="Offset", type=integer, defval=0, minval=-500, maxval=500)
out = wma(src1, len)
plot(out, title="Entry", color=yellow, linewidth = 2, offset=offset)
plotshape(crossover(RSI, len) , style = shape.triangleup , location = location.belowbar , color = green , size = size.large)
plotshape(crossunder(RSI, len) , style = shape.triangledown , location = location.abovebar , color = red , size = size.large)