Yes, the syntax was a bit off. See if - Ignition User Manual 8.0 - Ignition Documentation. The required syntax is if(condition, trueReturn, falseReturn). Note the closing parenthesis for the if statement comes after everything else, not after condition. You don’t need “= true”, and the if expression requires values to return for both true and false, with condition and the two returns separated by commas. It returns the value that will be bound to the property you put the binding on; you don’t reference the property in the binding.
Put this in New Template.Rectangle 1.fillPaint expression binding (don’t include New Template.Rectangle 1.fillPaint in the expression):
if({Close_Tag} && !{Open_Tag},
// Use this color when true.
color (255,0,0,0),
// Use this color when false
color (255,0,0,0)
)
P.S. Make posted code easy to read by enclosing it in triple back ticks ``` on a line above and below–or use the preformatted text button: