FAQ – The `transp` argument will be deprecated soon – how to fix it?

Recently, you might start to see the following warning message for your PineScript indicators: The `transp` argument will be deprecated soon. We recommend using color.new() or color.rgb() functions to specify the transparency of the plots instead.

It seems like pretty soon TradingView will deprecate “trasnp” parameters in all Pine Script plotting functions. Here is an example that causes this error:

//@version=4
study("My Script")
plot(close, color = color.green, transp = 50)

To fix this issue you can use transparency parameter in “color.new” or “color.rgb” function. So this example you can rewrite the following way with color.new function.

//@version=4
study("My Script")
plot(close, color = color.new(color.green, transp = 50))

You can also use color.rbg function with RGB type of colors:

//@version=4
study("My Script")
plot(close, color = color.rgb(0, 255, 0, transp = 50))

I think it makes sense to rewrite your scripts and exclude all “transp” parameters from plotting functions now so later your indicators will be functional.


Follow me on TradingView and YouTube.