Mismatched input 'end of line without line continuation' expecting ')'
Count the brackets on the marked line and add the missing ).
Updated 23 October 2026. Runs in your browser; nothing you type is uploaded.
Try a worked example
My script, Pine v5 indicator
TradingView's compiler stops at line 3
Mismatched input 'end of line without line continuation' expecting ')'
Static checks, which read the code as written: No repaint flags found · 1 Pine v6 migration item. Edit the script and the compiler line goes; the checks below follow your edits.
Critical repaint flags
0
0 caution flags to verify
Bar-close gate
Not found
barstate.isconfirmed or a bar-close alert
Higher-timeframe calls
0
request.security() calls, of a 40 limit
Plots and alerts
1
Plots, of a 64 limit; 0 alerts
Repaint and lookahead
No lookahead leaks, unshifted request.security() calls or realtime-only signal branches found in this snippet.
Pine Script v6 migration checklist
These lines don't compile in v6, or behave differently. Check each one (TradingView's guide).
- Line 1: Script targets Pine Script v5 (current is v6)Caution
Line 1 declares //@version=5. Changing the header alone does not convert the script: v6 changed how bools, division, conditions and some strategy settings behave.
Fix: Convert it with the Pine Editor's built-in converter (TradingView's migration guide shows where), then work through the items listed here.
TradingView's guide on this
Want TradingView indicators whose Pine Script v6 source already passes every check?
Every desk in Pine Pro Library ships as readable .pine v6 source with confirmed higher-timeframe requests and barstate.isconfirmed event logging.
What causes it
A bracket opened on the line is not closed before the line ends. This is Pine v5's wording.
The fix, compiled
Count the brackets on the marked line and add the missing ). A call nested in another call needs one for each.
//@version=5
indicator("My script")
plot(ta.sma(close, 14)//@version=5
indicator("My script")
plot(ta.sma(close, 14))The same mistake in Pine v6
Compiled as //@version=6, the same code prints, at line 3:
Syntax error: Missing closing parenthesis
That message, with its own fix
Syntax: lines, brackets and characters
- Syntax error: Missing closing parenthesis
- Syntax error: Extra closing parenthesis
- Syntax error at input "end of line without line continuation"
- Syntax error at input "strategy"
- Syntax error at input "label"
- Syntax error at input "line"
- Syntax error at input "plotshape"
- Syntax error at input "plot"
- Syntax error at input "overlay"
- Syntax error at input "new line"
- Mismatched input 'strategy' expecting 'end of line without line continuation'
- Mismatched input 'if' expecting 'end of line without line continuation'
- Mismatched input 'label' expecting 'end of line without line continuation'
- Mismatched input "if" expecting set "end of line without line continuation"
- Extraneous input ":" expecting "end of line without line continuation"
- no viable alternative at character "“"
Compiled on TradingView 23 October 2026. The checker above reads repaint and v6 migration patterns; TradingView's compiler is the final word on whether a script compiles.
Have your AI fix the next one
- Pine Fixer An AI skill pack for 45 compiler-verified Pine v6 failure classes, with a repaint clinic. $9.99 once.