The Assay IDE — a one-row header, the left rail, the code editor, completion and hover, the live preview on the chart in front, run and inspect, stops, the status row and its drawer, history.
The IDE is a window of its own: the Assay button on the application's bar, My indicators' pencil, New Assay script, Settings › Indicators, or a script file dropped onto Bentrix.
01The window
The window is three parts: one header row, the script's face in the middle, and one status row at the foot.
The header carries, from the left:
- The script's kind as an icon in a tinted disc — an indicator or a strategy; hover it for its word.
- The script's name, edited in place: press it to rename (a pencil appears under the pointer); the file name is its hover.
- Tabs, only while more than one script is open — a single script shows none. Tabs that do not fit fold under a +n chip. An unsaved script carries a dot. A round + opens a new script, and the split icon shows a second script beside the one in front.
- The face switch — one segmented control of three icons: Code, Graph and Both side by side. It never moves, however many tabs are open.
- At the right: Find (the command palette, also Ctrl+Shift+P), Open, Save, and the one filled button, Add to chart — its hover says where it puts the script.
The left rail is a narrow column of icons: Scripts — your indicators and strategies, each with its kind's icon — and, on a graph face, Building blocks. A press opens that panel beside the rail; the same press folds it (Ctrl+B folds the panels too), and the face takes its room. On Both the panels start folded, so the text and the sheet have the width. On the Code face the right side shows the outline — the script's functions, types and variables; on the Graph face it shows the Inspector of the block picked (see the graph).
The status row is always there: a problems pill — a check and No problems, or the count when there is one, which opens the Problems view — then the last run (500 bars in 12 ms), the line and column, and the version. A new script that holds only its declaration reads Nothing drawn yet, quietly: it is a start, not a problem. Then the views as tabs — Problems, Console, Inspector, Profile and History — beside Run and the preview. A tab's press opens its view as a drawer above the row; the same press folds it. Compatibility and its export live in the Problems view.
With no script open, the IDE shows two ways in, as two pictures: Write — a few lines of code — and Build — two blocks and their wire. A press on one opens a new script on that face.
02The graph
The face switch shows the script as Code, as a Graph of wired blocks, or Both side by side. The graph is the same script: building blocks dragged in, values edited with one press, names wired onto inputs, rows moved and wrapped, nodes wired socket to socket on the board — each written into the text at once, one step Ctrl+Z takes back. See the graph.
03Writing
The editor gives line numbers, folds, find, completion as you type (in the text's own version), the signature of the call you are in, a hover on every name, go to definition, references and rename, and Format. Problems are underlined as you type. Syntax colours in Settings › Assay is Quiet or Full; the minimap is a setting too.
04The preview
The eye icon turns on the preview: the chart in front itself — its own bars, type, colours and drawings — with the draft's lines over it, re-run 400 ms after you stop typing whenever the text compiles. A text that does not compile keeps the last good preview. Nothing of the preview is saved.
05Run and inspect
F5 runs the script over the chart in front, recorded from its first bar. The Inspector view shows any bar's named values and the lines that ran on it (‹ › walk the bars). F9 sets a stop on a line, with a condition if you like; F11 lists one bar's statements and F10 walks them. Continue to a stop steps the front laboratory workbench's replay a candle at a time until a stop fires (paper and real workbenches are refused). The Console shows the script's log.* lines; the Profile each top-level statement's time and share.
06History
Each save that changed the text, each run, each format, conversion and restore keeps a version in the script's history, and a draft is kept after five idle minutes — for a script never saved too. A version opens against the text in the editor; Restore is one edit Ctrl+Z takes back.
07For agents, and other editors
Everything the IDE does is an agent's tool too — completion, hover, signature, definition, references, rename, symbols, format, folds, the vocabulary, conversion, the run inspected, the history, and the window itself (see indicators and scripts). And bentrix --lsp serves the same language service to any editor that speaks the Language Server Protocol.