I got TradingView's 'end of line without continuation' error with Pine Script
I am using this code in Pine Script but getting the "mismatched input 'a' expecting 'end of line without line continuation'" error. How to fix that error with this function code? val(s) => if s != s[1] a = s-s[1] if s = s[1] a a The 'end of line without continuation' error happens when there's an indentation mistake in the TradingView Pine code. Looking at your code (and assuming copying it into StackOverflow went right), there is indeed an indentation problem: val(s) => if s != s[1] a = s-s[1] if s = s[1] a a There are two indentation problems in this code: The first 4 lines of the function