A four-space continuation can break a ternary
This example isolates the whitespace problem without changing the condition. The invalid assignment is commented out so the complete script remains usable. To reproduce the error, replace the working assignment with the BROKEN fragment and remove its comment prefixes, preserving the four leading spaces. The repair uses two spaces on each continuation line.
//@version=5
indicator("Ternary continuation")
// BROKEN: four-space continuation outside parentheses.
// direction = close > open ?
// 1.0 :
// -1.0
// FIXED: two-space continuation.
direction = close > open ?
1.0 :
-1.0
plot(direction, "Direction")