Cause
transp set the transparency of plots in v4. Pine Script v5 deprecated it, and v6 removed it from bgcolor(), fill(), plot(), plotarrow(), plotchar() and plotshape().
Broken code
TradingView reports the error on line 3.
//@version=6
indicator("Candle background", overlay = true)
bgcolor(close > open ? color.green : color.red, transp = 85)Fixed code
The same script, corrected for Pine Script v6. Paste it into the Pine Editor and save.
//@version=6
indicator("Candle background", overlay = true)
bgcolor(close > open ? color.new(color.green, 85) : color.new(color.red, 85))Why it works
Transparency is now part of the color itself. color.new(color, transp) returns the same color with a transparency from 0 (opaque) to 100 (invisible), and it works everywhere a color is accepted, including labels, lines, boxes and tables. For a custom color, color.rgb(red, green, blue, transp) does the same.
Other plot functions
The message names the function you called: The "plot" function does not have an argument with the name "transp" for plot(), and so on. The fix is the same everywhere: remove transp and wrap the color in color.new().
Questions
How do I make a plot transparent in Pine Script v6?
Pass a color created with color.new(), for example plot(close, color = color.new(color.blue, 70)). 0 is opaque and 100 is fully transparent.
Why did transp work in my v5 script?
v5 still accepted it as a hidden, deprecated argument. v6 removed it completely. The Pine Editor's v5-to-v6 converter deletes transp arguments, so check the colors after converting.
The scripts on this page are minimal examples written to show the error and its fix, not trading systems. Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.