Pine script 我怎样才能把一个形状放在一个酒吧上面5次?

Pine script 我怎样才能把一个形状放在一个酒吧上面5次?,pine-script,Pine Script,我想展示一个形状,它垂直保持一个形状5次,你可以在图像中看到它。有没有人可以用松树脚本来建议如何做呢 我已将形状标记为三角形此代码显示了实现效果的不同方法: //@version=4 study("Lift text", "", true) // Use U+200E (Decimal 8206) as a non-printing space after the last "\n". // The line will become difficult to edit in the edito

我想展示一个形状,它垂直保持一个形状5次,你可以在图像中看到它。有没有人可以用松树脚本来建议如何做呢


我已将形状标记为三角形

此代码显示了实现效果的不同方法:

//@version=4
study("Lift text", "", true)
// Use U+200E (Decimal 8206) as a non-printing space after the last "\n".
// The line will become difficult to edit in the editor, but the character will be there.
// You can use https://unicode-table.com/en/tools/generator/ to generate a copy/pastable character.
plotshape(true, "", shape.arrowup,      location.abovebar, color.green,     text="A")
plotshape(true, "", shape.arrowup,      location.abovebar, color.lime,      text="B\n‎")

plotshape(bar_index % 2 == 0, "", shape.arrowdown, location.belowbar, #00000000, text="▼\n▼\n▼\n▼\n▼", textcolor = color.red)
plotchar(bar_index % 2 == 1, "bar_index % 2 == 0", "", location.belowbar, text = "▲\n▲\n▲\n▲\n▲\n")

在编辑器中,FAQ中的代码应该如下所示,红色方块表示Unicode空白字符


它确实有效。如果只需要在一个条件下显示五个箭头,则可以使用最后两行中的一行来实现效果。请参阅我对答案的编辑。非常抱歉。我只是跟踪了链接,没有看到你的代码。它工作得很好