Custom Script (DeltaDSL host)
Drop a DeltaDSL script onto the chart and it runs as a first-class indicator — same render loop, same alert pipeline as the built-ins, written by you.
Custom Script is the wrapper that runs your own DeltaDSL scripts on the chart as if they were native indicators. The script paints into the same overlay or sub-pane the built-ins use, reads from the same OHLCV feed, and feeds the same alert builder — but the actual logic is whatever you (or a script author you trust) wrote. Useful when nothing in the catalog plots quite the way you want, or you have a private setup you don't want to share.

Settings reference
The settings popover for a Custom Script is auto-built from the script source. Every @input line in the script becomes a row in the popover; the widget type is picked automatically from the declared input type. There are no fixed parameter sections — the popover reshapes itself per script. The table below lists what's always there, regardless of which script you loaded.
| Section | Setting | Default | Notes |
|---|---|---|---|
| Header | Script name | from script's @name | Displayed at the top of the popover so you can tell instances apart when you have several custom scripts on the same chart. |
| Edit code | — | Opens the script editor for this exact script. Save in the editor and the chart re-renders against the new source. | |
| Inputs | Auto-built per script | from each @input default | One row per @input declared in the source. The widget follows the input type — checkbox for bool, numeric stepper for int / float / price, dropdown for string / source when options= is set, color picker (with alpha) for color, free-text for any other string. Each row carries a small INT / FLOAT / BOOL / COLOR / STRING / SOURCE / PRICE tag so the type is obvious at a glance. |
| Min / max clamp | from @input minval / maxval | Numeric inputs respect the bounds the script author declared. The stepper refuses to push the value past them. | |
| Execution | Realtime calculation | Off | When on, the script recomputes on every incoming tick instead of only when a bar closes. Useful for live-fire signals where bar-close latency hurts; leave off for slow, end-of-bar structure work. |
If the loaded script has no @input declarations, the popover replaces the Inputs rows with a one-line hint pointing you back at the editor with an example @input line — so the popover never looks broken when there's genuinely nothing to tune.
If the script source has errors, the popover shows a red error strip at the top with the line number and message, before the inputs block. The chart keeps the last good render in the meantime; fix the source in the editor, save, and the strip clears.
How to use it
- Open the Indicators dialog from the chart toolbar.
- Switch to the My Scripts tab — or Favorites for scripts you've starred from elsewhere, Invite-only for scripts shared privately with you.
- Click an existing script row to enable it on the chart, or click Create new script to open the editor with a blank canvas.
- In the editor, write or paste a DeltaDSL script — declare a name with
@name, pick where it draws with@pane, expose tunable knobs with@input, then call drawing primitives likeplotLine,plotShapeoralertconditionto produce output. The chart redraws as you type. Save when the script does what you want. - Each enabled script becomes a legend row on the chart. Click the cog on that row to open the per-script settings popover.
- Tune the
@inputknobs — every change applies immediately, there is no save button. The script re-runs and the chart repaints in place. - Toggle Realtime calculation on if you want intra-bar updates rather than bar-close-only.
- Use Edit code at the top of the popover to jump back into the editor for that script.
Common pitfalls
- Looking for a fixed settings list — there isn't one. Custom Script's popover is whatever the script's
@inputlines declare. Two different scripts produce two completely different popovers. If a knob you expect isn't there, check the source — somebody removed the@inputfor it (or never added it). - Changing inputs and expecting other devices to follow — knob positions are saved per device, locally. Open the same chart on your phone and it will show the script's defaults, not the values you tuned on desktop. The script source itself does sync across devices; the per-knob overrides do not.
- Leaving Realtime calculation on for heavy scripts — recomputing on every tick is the right call for fast cross / threshold signals, but wasteful for multi-bar structure work (pivot scans, regression lines, divergence sweeps). Leave it off unless you specifically need intra-bar updates; the script will run on bar close and stay responsive.
- Editing a live script and being confused by mid-typing errors — the chart re-runs after every save. Save half-finished code and the popover will show a red error strip until the syntax is clean again. The chart keeps the last good render in the meantime, so the view itself doesn't break.
- Treating the legend's X button as "delete script" — it removes the script row from this chart only. The script itself stays in your My Scripts library and you can re-enable it from the Indicators dialog whenever. To delete a script permanently, use the trash icon inside the editor, not the chart legend.
- Trying to load network data or read browser state from inside the script — DeltaDSL is a closed scripting language by design: no
fetch, nowindow/document, nolocalStorage, noeval. If you need an external data source, surface it through the chart's built-in feeds or open a feature request — there is no escape hatch from the script side. See DeltaDSL pitfalls.
What's next
- DeltaDSL — Introduction — the language Custom Script runs. Start here if you've never written a DeltaDSL script.
- DeltaDSL — Getting started — write your first five-line script and watch it render on the chart.
- DeltaDSL — Inputs & directives — how
@input,@nameand@panemap to the popover rows documented above. - DeltaDSL — Drawing — every line, shape, label, box and marker primitive a script can call.
- DeltaDSL — Alerts — wire
alertcondition()declarations into push, Telegram and in-app notifications. - DeltaDSL — Recipes — copy-paste cookbook covering the most common indicator shapes.
- DeltaDSL — Pitfalls — runtime limits, sandbox boundaries and performance notes.
- Live Signals — built-in long / short signal layer if you'd rather not roll your own.