【问题标题】:How to change a text color inside a shape in pine script?如何在 pine 脚本中更改形状内的文本颜色?
【发布时间】:2019-06-03 08:34:54
【问题描述】:

如何更改标签形状内的文本颜色?我不想更改标签的颜色以保持对比度。

plotshape(Trend == 1 and Trend[1] == -1 ? Trend : na, color=lime, style=shape.labelup, text='BUY') plotshape(Trend == -1 and Trend[1] == 1 ? Trend : na, color=red, style=shape.labeldown, text='SELL')

【问题讨论】:

    标签: pine-script


    【解决方案1】:

    plotshape() 函数有 colortextcolor 参数。

    颜色形状的颜色。

    textcolor文本的颜色。

    //@version=3
    study("My Script", overlay=true)
    plotshape(series=close > open, text="Green\nCandle", style=shape.labelup, location=location.belowbar, color=green, textcolor=red, size=size.small)
    

    【讨论】:

      猜你喜欢
      • 2022-01-12
      • 1970-01-01
      • 2021-03-29
      • 1970-01-01
      • 2019-10-27
      • 1970-01-01
      • 1970-01-01
      • 2020-02-01
      • 2013-07-14
      相关资源
      最近更新 更多