New

Complete Suite: all 11 tools. 5 new Premium desks inside.All 11 tools $557.98 one by one

$557.98 one by one $97 once Save $460.98Get the SuiteGet it

Syntax error at input "line"

Break the line after the condition and indent line.new() four spaces.

Updated 23 October 2026. Runs in your browser; nothing you type is uploaded.

Try a worked example

My script, Pine v6 indicator

TradingView's compiler stops at line 3

Syntax error at input "line"

Static checks, which read the code as written: High repaint / lookahead risk (1 critical issue). Edit the script and the compiler line goes; the checks below follow your edits.

Critical repaint flags

1

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

  • Line 3: History vs realtime branching (barstate.isrealtime / islast / ishistory)High risk

    Using barstate.isrealtime, islast, or ishistory in signal calculations causes the script to compute one rule on live bars and a different rule when the chart reloads.

    Fix: Keep barstate.islast strictly for drawing labels/tables, never inside signal or entry conditions.

Pine Script v6 migration checklist

Declares //@version=6, and none of the migration patterns this checker reads were found. TradingView's compiler is the final word.

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

An if and the line.new() it guards are on one line. Pine's if takes its body on the lines below, indented four spaces.

The fix, compiled

Break the line after the condition and indent line.new() four spaces.

Prints the error at line 3
//@version=6
indicator("My script", overlay = true)
if barstate.islast line.new(bar_index - 10, low, bar_index, high)
plot(close)
Compiles with no error
//@version=6
indicator("My script", overlay = true)
if barstate.islast
    line.new(bar_index - 10, low, bar_index, high)
plot(close)

Syntax: lines, brackets and characters

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.

Method and privacy

Method: The script loaded in the checker was compiled on TradingView's Pine compiler on 23 October 2026 as //@version=6, and printed this error at line 3; the fix below compiled with no error or warning. Names such as variables come from the example and will differ in your script.

Calculations run entirely in your browser — nothing you type is uploaded. Your last numbers stay in this browser so you can pick up where you left off; Forget them clears them. A link with your numbers carries them after the # sign, which browsers do not send to servers, and the page takes them out of the address before any analytics loads. Copy and download actions save your calculation locally. The site may record coarse tool actions under its privacy policy, without inputs, results, file contents or filenames.

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.

Goes deeper

Limits and trading risk

These tools calculate from your inputs, supported historical records or explicitly labelled teaching examples. They do not verify a live account, predict future returns or confirm that a broker or prop-firm rule has been met. Missing costs, floating losses and changed market conditions can materially change outcomes. Trading can lose the capital committed to it; check the stated method and your account specifications.

Read the risk disclosure