Pine Script Issues line 10: Syntax error at input 'end of line without line continuation'

1.1k views Asked by At

I have been stumped on this issue for a little while. I am new to pine-script and I am hoping to get some insight on how to fix this line 10: Syntax error at input 'end of line without line continuation' I am getting.

I checked my tab spacing and nothing seems to work. Any help would be appreciated

tp =9
f(n) => 100-abs(50-n)*2

colorFill(v) => 
      v>=95?http://color.new(http://color.red/,tp*0):
      v>=90?http://color.new(http://color.red/,tp*1):
      v>=85?http://color.new(http://color.red/,tp*2):
      v>=80?http://color.new(http://color.red/,tp*3):
      v>=75?http://color.new(http://color.red/,tp*4):
      v>=70?http://color.new(http://color.red/,tp*5):
      v>=65?http://color.new(http://color.red/,tp*6):
      v>=60?http://color.new(http://color.red/,tp*7):
      v>=55?http://color.new(http://color.red/,tp*8):
      v>=50?http://color.new(http://color.red/,tp*9):
      v>=45?http://color.new(http://color.red/,tp*9):
      v>=40?http://color.new(http://color.red/,tp*8):
      v>=35?http://color.new(http://color.red/q,tp*7):
      v>=30?http://color.new(http://color.red/,tp*6):
      v>=25?http://color.new(http://color.red/,tp*5):
      v>=20?http://color.new(http://color.red/,tp*4):
      v>=15?http://color.new(http://color.red/,tp*3):
      v>=10?http://color.new(http://color.red/,tp*2):
      v>=5?http://color.new(http://color.red/,tp*1):
      http://color.new(http://color.red/,tp*0)
1

There are 1 answers

0
e2e4 On BEST ANSWER

You had multiple non-syntax symbols in the code. Cleaned it up, now compiling.

tp =9

colorFill(v) => 
      v>=95?color.new(color.red,tp*0):
      v>=90?color.new(color.red,tp*1):
      v>=85?color.new(color.red,tp*2):
      v>=80?color.new(color.red,tp*3):
      v>=75?color.new(color.red,tp*4):
      v>=70?color.new(color.red,tp*5):
      v>=65?color.new(color.red,tp*6):
      v>=60?color.new(color.red,tp*7):
      v>=55?color.new(color.red,tp*8):
      v>=50?color.new(color.red,tp*9):
      v>=45?color.new(color.red,tp*9):
      v>=40?color.new(color.red,tp*8):
      v>=35?color.new(color.red,tp*7):
      v>=30?color.new(color.red,tp*6):
      v>=25?color.new(color.red,tp*5):
      v>=20?color.new(color.red,tp*4):
      v>=15?color.new(color.red,tp*3):
      v>=10?color.new(color.red,tp*2):
      v>=5?color.new(color.red,tp*1):
      color.new(color.red,tp*0)