If an agent is going to help you research markets, it needs somewhere precise to put its work. A chat reply disappears. A vague “edge” you cannot reopen next week is useless. Chartnaut’s research scripting exists so agents can build durable objects — indicators, definitions, and studies — that you can inspect, extend, and carry onto the chart.
Most of our audience will never live in the Code tab, and that is fine. Agent and the authoring specialists draft the same scripts a power user would write by hand. You describe what you want in plain language, review the result on a chart, and approve the change. When you outgrow the first draft, you can open the script yourself and push further — or ask the agent again.
This post is about why that stack exists, how the pieces fit together, and how it feeds the Chartnaut vision we sketched in Hello world: individuals powered by agents, still in the seat, working from evidence.
Why we built a scripting engine
Agents are only as trustworthy as the artifacts they leave behind. We needed a shared language for chart math, named setups, and measured outcomes — something the product can run, version, collect over history, and reattach later. That language is Chartnaut’s research scripting model.
We built it first so agents could code for you with structure: lint, budgets, dependencies, and a clear place for each kind of work. We kept it open so you can extend those objects yourself when you want more control. The Code tab is optional infrastructure. The objects it produces — an indicator you reuse, a definition you collect, a study you pin — are the product.
Three building blocks, one loop
Research in Chartnaut moves through a small pipeline. Each step has a job you can point at on screen:
- Indicators draw the math on your chart — averages, oscillators, custom overlays you actually look at while trading or researching
- Definitions name a market situation so Chartnaut can find every time it appeared in history
- Studies measure what usually happened after those situations — across a real collected sample
- Forward Insights put a finished study back on the Terminal so matching events show historical context while you trade or practise
In practice the loop feels simple: paint what you need, name the setup, collect history, ask what followed, and if the answer is honest, keep it on the chart. Specialists can walk that path with you through Agent, or you can open each library yourself under Research.
The chart is how you verify the agent
Non-technical traders should not have to audit source code to trust research. They should be able to see it. When an agent drafts an indicator, you watch the series on the preview chart. When it authors a definition, you see the events pinned on history. When a study finishes, you read the summary and open individual matches. When you put a Forward Insight on the Terminal, you click a live or replay event and see what historically followed.
That visual loop is deliberate. Charts are the shared surface between agent and trader. If the lines, marks, and stats do not match what you asked for, you push back before anything compounds into a bad habit. Scripting gives agents precision; charts give you a way to confirm the precision without becoming a programmer.
Indicators you can reuse
An indicator is chart math with a home in your library. Built-ins sit next to custom work. You can install from community lists, ask the indicator agent to draft something new, or write it yourself. Once it is saved, definitions and studies can lean on the same calculation instead of reinventing it.
Indicators stay useful in live markets and in backtesting sessions, because they live in the same Terminal workspace. They answer what the value is on this bar. Questions about what usually followed a setup belong in studies.
Definitions that Collect can find
A definition teaches Chartnaut when your setup appears — opening-range break, failed sweep, pullback after a level, whatever you already trade by eye. Agents can draft the rules from a description; you review the matches on the chart, then Collect a stretch of history once you trust them.
Collecting definition events is separate from logging your own trades into a playbook. One builds a market sample for research. The other builds your personal sample for Historical Intelligence. Both matter, and Chartnaut keeps them apart on purpose so neither pollutes the other.
Studies that measure what followed
A study attaches to a definition you have already collected and asks a clear question: how often did price reach the first target, how far did it run before reversing, did London behave differently from New York. You can phrase that in plain language through the study agent, or open Code when you want more control over the measurement.
The result is something you can reopen next month — summary, breakdowns, and a list of events you can inspect on the chart. Research studies measure market setups. Questions about your own fills — tags, playbooks, journal patterns — live as trade studies on the trade library. Same impulse to ask better questions; different data.
Forward Insights on the Terminal
When a study measures what happened after the event, you can Put it on chart as a Forward Insight. Matching situations in live or replay show the historical readout without leaving the Terminal. That is the last mile of the research loop: evidence at the moment of decision.
Agent can propose this step after a study finishes. You approve or skip. The Forward insight agent helps with the chart presentation; the study itself stays focused on measurement. You stay in the seat for both.
Agents and the Code tab
Each kind of object has a specialist agent — indicators, definitions, studies, and Forward Insights — and Agent routes the path so you are not guessing which chat owns the next step. Agents lint before they propose, resolve dependencies before inventing new ones, and pause for approval on edits that change saved work.
Power users can open the Code tab and extend any of those objects by hand. Everyone else can stay in product UI and still get first-class research artifacts. The scripting engine is the shared substrate; agents and humans write to the same place.
How this feeds the vision
Chartnaut’s bet is individuals powered by agents across practice, live trading, research, and review — deeper tooling, tighter integration, evidence on the chart. Research scripting is how that bet stays concrete. Agents need a precise place to put work. Traders need a precise way to verify it. Indicators, definitions, studies, and Forward Insights are that bridge.
The same Terminal that hosts replay and live trading hosts the research objects you build. Nothing important should live only in a chat transcript. Ideas that compound are ideas you can reopen, remeasure, and still see on the chart.
Where to go next
Start in the product if you prefer plain language — Indicators, Definitions, Studies, and Forward Insights. Ask Agent to walk a first research path, or open one library and build a single setup you already know by eye.
When you want signatures, examples, and agent maps, Docs under Scripting and Research cover the same model in more depth. Either door leads to the same objects. That is the point of the engine: agents can code for you, you can extend yourself, and the chart stays the place you prove the work is real.
