T102
operator not defined for these operand types
Severity Error
The operator is applied to operand types it does not support, for example adding two colors, multiplying a string, or comparing a bool with <. Arithmetic works on int and float, + also joins two strings, and time values combine with durations.
Use the dedicated function for the job, such as color.mix for blending or str.format for text, or convert the operands first.
Failing example
script "Blended line"
data chart = subscribe(data.ohlcv)
plot mid = plot.line(title: "Midpoint")
on chart.close {
let tint = color.bull + color.bear
mid.plot((chart.high + chart.low) / 2.0, color: tint)
}Fixed example
script "Blended line"
data chart = subscribe(data.ohlcv)
plot mid = plot.line(title: "Midpoint")
on chart.close {
let tint = color.mix(color.bull, color.bear, 0.5)
mid.plot((chart.high + chart.low) / 2.0, color: tint)
}