I'm having this "mismatched input 'if' expecting 'end of line without line continuation'" error in pinescript with the following block of code:
arrow(direction, bar, color) =>
if direction == "up"
plotchar(bar, high, "\u2191", color, size = size.normal)
else if direction == "down"
plotchar(bar, low, "\u2193", color, size = size.normal)
You cannot use plot*()
functions in a local loop.
You can apply your condition to the series
argument of your plot()
call as a workaround so it would conditionally plot.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.