Pine script 如何防止文本重叠

Pine script 如何防止文本重叠,pine-script,Pine Script,使用plotshape时,如何防止文本覆盖 如果条件满足 展销 如果第二个传导满足 显示长 当两个条件都满足时,两个文本就彼此堆叠。如何防止这种情况发生您需要使用\n后跟一个特殊的非打印字符,该字符不会被去除。这里我们使用的是U+206A。虽然在以下代码的字符串中看不到它,但它在那里,可以复制/粘贴: //@version=4 study("Lift text", "", true) // Use U+206A (Decimal 8298) as a non-printing space aft

使用plotshape时,如何防止文本覆盖 如果条件满足 展销 如果第二个传导满足 显示长


当两个条件都满足时,两个文本就彼此堆叠。如何防止这种情况发生

您需要使用
\n
后跟一个特殊的非打印字符,该字符不会被去除。这里我们使用的是U+206A。虽然在以下代码的字符串中看不到它,但它在那里,可以复制/粘贴:

//@version=4
study("Lift text", "", true)
// Use U+206A (Decimal 8298) 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, text="A")
plotshape(true, "", shape.arrowup, location.abovebar, text="B\n ")
plotshape(true, "", shape.arrowup, location.abovebar, text="C\n\n")
plotshape(true, "", shape.arrowup, location.abovebar, text="D\n\n\n")

非常感谢