Skip to main content
A message names the line and column; names in backticks stand for the name in your script. Fix the first error and check again: a script with several syntax errors reports only the last, and after a clean syntax most checks stop at the first error. The editor’s check reports syntax, names, types and scope. Adding to the chart also applies the compile-only rules below. Running raises the runtime errors, on a bar.

Syntax

Names

Types and qualifiers

Arguments and scope

Compile-path-only rules

These pass the editor’s check and fail when the script is added to the chart (the phases are in The editor). indicator("Mintick", format=format.mintick) gives, when adding to the chart: The format argument of indicator() only accepts format.inherit, format.price, format.volume, or format.percent. Got format.mintick. The same phase refuses a plot or hline format other than format.price, format.percent, format.volume; any display but display.none and display.all on fill, barcolor, bgcolor; an indicator() title over 128 characters; and input.time(timestamp("2024-01-01")), since timestamp() is na there (Argument defval of input.time() cannot be na.): give milliseconds; and a length above 500 in talib.ema, macd, bbw, kc or kcw (the history message on Limits); and a switch inside a called function, which is refused with only Not Implemented (use if).

Runtime errors

These stop the script on a bar. The limit messages (history range 0 to 500, array size 10000, 45 seconds) are on Limits.