Script console and output preview

The console shows the log of the last run with its error and warning counts, and the preview sketches the outputs the run produced, directly under the code that produced them.

Senzoukria · Documentation · Updated September 2026


Where to find it

Where
Scripting page → below the editor
Console title
"Output", always visible — never conditional
Counts
Total lines, plus separate error and warning counts when there are any
Error line
Shown as L<line> in the console header and highlighted in the editor gutter
Preview bars
Synthetic, ungraduated and normalised per output

What it does

The console prints the log of the last run, one numbered line per entry, scrolled to the newest. Its header carries the run summary — duration, number of outputs or the error — so the question "what did this run do" is answered in one place. A Clear button empties it; it is disabled while a run is in progress or when there is nothing to clear.

Empty and never-run are distinguished, and the empty-state text is written in the language of the script: Python is told to use print(), JavaScript is told to use log() or console.log().

Under the console, each output the run returned is sketched. Nothing new is computed: these are the same outputs, drawn. Each is named by its shape — line, histogram, markers — using exactly the word the reference column uses.

What each state means

Console and result states, and what they tell you
StateDefaultWhat it changes
Never runinitialThe console invites a run and names the tracing function for the script's language.
Ran, no log linesThe script executed and printed nothing; the message says so rather than looking broken.
Ran, outputs drawnOne sketch per output, named by its shape.
Ran, nothing plottedThe run reports that the script ran without error and plotted nothing — check that the values returned are numbers.
Unrecognised returnThe value returned is not a series, lines or markers; the reference column's "Indicator: what to return" lists the accepted shapes.
FailedThe header shows L<line> before the message, and the editor highlights that line.

How the failing line is found

A syntax error from the JavaScript engine carries no position. Rather than guessing at suspicious characters — a method that once accused a perfectly innocent dash inside a comment — the failing line is measured: the script is compiled prefix by prefix, each prefix first closed so that it is syntactically complete, and the first line whose addition produces a real error is the one reported.

This costs one compilation per line, only after an error has already occurred, so nothing is paid on the normal path.

Limits and pitfalls

  • The sketches are not a chart preview: there is no axis, no scale and no readable value, and each output is normalised on its own amplitude, so two sketches side by side do not compare.
  • Gaps lift the pen, exactly as the chart renderer does — a moving average's warm-up shows as a missing start, not as a straight line through nothing.
  • A series needs at least two finite points to show a shape; a single point draws no segment.
  • The console's height is bounded and it scrolls on its own, so a talkative script never pushes the editor off the screen.

This page in other languages

Frequently asked questions

The console says "No output" but my script works. Why?
That message is about the log, not about the drawing. It means the script printed nothing. If the sketches below are also empty, the script returned no output.
Why does the error point at a line I cannot see?
That happens when the declared language contradicts the code, because a wrapper in the other language is appended to your source. The Check step of the ribbon flags this and offers to switch language.
Do the sketches tell me whether my indicator is right?
No. They tell you whether it is empty, flat, gapped or shaped the way you expected, on synthetic bars. Judgement about a market belongs to replay and backtesting, which use real data.

Keep reading