LuxAlgo

Making indicators

Generate an indicator from plain language, an image, or a selected chart region.

View as Markdown

Ask Quant in the chat for the study you want. It writes a Pine Script® indicator, plots it on the active chart, and marks it in the legend so you can tell it apart from library studies.

This page is about generating custom studies. To add built-in, order-flow, or LuxAlgo Library studies, use the Indicators picker instead. See Indicators.

Describe the study

Tell Quant what you want in the chat. Include where it should render: in its own pane below the chart (oscillators like RSI) or as an overlay on the price candles (moving averages, bands, signals), plus any colors, line styles, or conditions that matter to you.

Review the script

Quant plots the result on the active chart. Open Code to see the generated Pine Script®, then Run (after you sign in). You can edit the code by hand at any point and re-run it.

Iterate

Request one change per message ("make the overbought zone red", "add an alert condition when the lines cross") until it matches what you had in mind. Small, single-purpose requests produce much better edits than a list of five changes at once.

On the Free plan, a Quant script does not count toward the 5-indicators-per-chart limit.

Keep it on the workspace

A Quant script on the chart is either saved with this workspace or a preview. The difference is whether it comes back when you switch chats, reload, or open the workspace again.

A script you generate in this workspace is saved automatically. No extra click. The legend shows Quant indicator (or Quant strategy).

The two buttons below appear only when that is no longer true.

Add to workspace

This banner means the script is plotting, but it does not belong to this workspace yet.

That happens when you open a chat that was created under a different workspace. Quant still runs the script on the active chart so you can see it. The legend says Quant indicator (preview). Switch conversations, or leave the workspace, and the preview is gone.

Add to workspace keeps the script that is already on the chart. It does not re-plot anything. From then on the script is saved with this workspace: it stays when you change chats, and it comes back when you reopen the layout.

Add to chart

This banner means the script is not on the chart.

That happens after you remove it (legend ✕, Object tree, or Remove indicators). Removing a saved Quant script also unsaves it, so it will not resurrect on reload.

Add to chart does both jobs: it plots the script on the active chart again, and it saves it to this workspace. Same result as adding that script from the Indicators picker.

Add to workspaceAdd to chart
When you see itPreviewing on this workspaceRemoved from the chart
Already on the chart?YesNo
What the button doesSave the preview with this workspacePlot it on the active chart and save it
Other charts in the layoutUnchangedUnchanged — only the active cell

Starring a Quant script is separate: Favorites follow your account, so you can add the same script from the picker on any workspace. Add to workspace / Add to chart only decide whether this layout keeps this instance.

From a screenshot

Quant can reverse-engineer an indicator or chart markup from an image.

Ways to hand it one:

  • Upload or paste into the chat, or Attach files from the +
  • Generate From Image on an empty chat, then pick the image
  • Attach chart screenshot from the + — the whole active pane
  • The camera in the chart header → Send to chat — the same full-chart capture

Images also work as a target: instead of describing the visual result you want, show it. "Make it look like this" with a screenshot is often more precise than a paragraph of styling instructions.

From a region on the chart

When you only care about part of the pane — a pattern, a label, a stretch of candles — use Capture area for Quant on the left drawing toolbar, above Measure.

  1. Click the tool. The chart dims.
  2. Drag a rectangle around what you want Quant to see. Resize from the handles, or drag the box to move it.
  3. Type (or speak) in the prompt on the selection, then send. Quant gets the crop plus your message.

This is not a drawing: it does not save with the workspace and it does not sit in the Object tree. Exit capture, Escape, right-click the chart, or a click outside the box leaves the tool.

Use it to ask about markup already on the chart ("what is this ABCD"), or to point at the thing you want changed ("add a bgcolor to the ratio labels").

Writing good prompts

  • Start simple. "An RSI oscillator with signals" is a better opening than a full specification. Get a working base, then refine.
  • Say what done looks like. Pane vs overlay, colors, line styles, and how it should behave in a specific case (e.g. "when price gaps, the band should not reset").
  • Build in small steps instead of asking for a full toolkit at once. Each request should add or change one thing.
  • For something large, ask for a plan first. Have Quant propose the structure, agree on it, then implement step by step.
  • After the first output, request one change per message. Batched change lists tend to get partially applied.

If the study depends on a specific market or timeframe to make sense, set the chart to it before iterating. Quant runs the script against the active chart's data, so you see realistic output while you refine.

When something breaks

Two kinds of errors can occur:

  • Syntax errors: the script fails to compile and nothing plots.
  • Runtime errors: the script compiles, but fails while running over history or on new bars. These appear as a message at the bottom of the chart.

For either, Fix with Quant feeds the error back to Quant and asks it to repair the script. If a script runs but doesn't visibly plot, inspect Code: the plot calls may be conditioned on something that never happens on this symbol or timeframe.

On this page