pine-script v5, script error of Mismatched input 'var8' expecting 'end of line without line continuation'

34 views Asked by At

This is the logic of my script in words, "VAR8 assignment: If the lowest price <= VAR5, return (VAR4+VAR6*2)/2, otherwise return the 3-day exponential moving average of 0/618*VAR7"

and the following is the coverted script by ChatGPT3.5

// VAR5
var5 = ta.lowest(low, 30)

// VAR6
var6 = ta.highest(var4, 30)

// VAR7
var7 = if ta.sma(close,58) ? 1:0

// VAR8
var8 = low <= var5 ? (var4 + var6 * 2) / 2 : ta.ema(0, 3) / 618 * var7

Mismatched input 'var8' expecting 'end of line without line continuation'

I would like to know why there is such error occur and how to fix it?

0

There are 0 answers