0
votes

How do I change the color of the text inside a label shape? I dont want to change the color of the label so that it maintains a contrast.

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')

1

1 Answers

0
votes

plotshape() function has color and textcolor arguments.

color: Color of the shape.

textcolor: Color of the text.

//@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)

enter image description here