Pine script 将箭头替换为plotshape和文本

Pine script 将箭头替换为plotshape和文本,pine-script,Pine Script,我有一个脚本,它在移动平均线交叉时添加了一个箭头,但我想改为显示标签向上/标签向下 study(title="MA 5/10 Strategy", shorttitle="MA Strategy 5/10", overlay=true) exponential = input(true, title="Exponential MA") src = close ma5 = exponential ? ema(src, 5) : sma(src, 5) ma10 = exponentia

我有一个脚本,它在移动平均线交叉时添加了一个箭头,但我想改为显示标签向上/标签向下

    study(title="MA 5/10 Strategy", shorttitle="MA Strategy 5/10", overlay=true)
exponential = input(true, title="Exponential MA")

src = close

ma5 = exponential ? ema(src, 5) : sma(src, 5)
ma10 = exponential ? ema(src, 10) : sma(src, 10)

buy_cond = cross(ma5, ma10) and ma5 > ma10
sell_cond = cross(ma5, ma10) and ma5 < ma10

plotarrow(buy_cond ? 1 : 0, colordown=lime, maxheight=25, minheight=15)
plotarrow(sell_cond ? -1 : 0, colorup=red, maxheight=25, minheight=15)

plot( ma5, color=green, style=line, title="5", linewidth=1)
plot( ma10, color=red, style=line, title="10", linewidth=1)

alertcondition(buy_cond, title = "Go Long", message = "Go Long")
alertcondition(sell_cond, title = "Go Short", message = "Go Short")
研究(title=“MA 5/10战略”,shorttitle=“MA战略5/10”,overlay=true)
指数=输入(真,title=“指数MA”)
src=关闭
ma5=指数?ema(src,5):sma(src,5)
ma10=指数?ema(src,10):sma(src,10)
购买条件=交叉(ma5、ma10)和ma5>ma10
销售条件=交叉(ma5,ma10)和ma5
那么,您尝试了什么?将plotarrow替换为plotshape,但没有成功。我真的没有太多的代码,也从来没有使用过pinescript。我只是尝试在谷歌上搜索一个解决方案,但找不到。那么,你尝试了什么?用plotshape替换plotarrow,但运气不好。我真的没有太多的代码,也从来没有用过pinescript,我只是尝试用谷歌搜索一个解决方案,但找不到。