AI Assistant

DocumentationWriting strategies

AI Assistant

The assistant answers questions about the code in front of you and about this documentation. It is a desktop feature: the key that answers lives in the main process, and the browser build has no main process.

Where it appears

In the editor. The panel beside the source reads the strategy you have open, so a question about "this indicator" is a question about the one on screen. It writes into the editor only when you ask it to.

On a documentation page. Select a passage and an ask button appears next to it. The question carries the passage and the page you are on, which is why the answer is about this engine and not about backtesting in general.

Providers and keys

Settings, AI holds the providers, in order. The first one is the primary. The rest are the fallback: if the primary fails, the next is asked. With one provider configured there is no fallback, and the panel says so rather than letting you find out during a run.

A provider is a name, a model and a key. The model is per provider, not global, because the same name means different things at different vendors. Test sends one short request and reports what came back, so a wrong key is a sentence and not a silence.

Keys are stored through the operating system's own secret store, encrypted at rest, and they never reach the renderer. A request is made in the main process with the key attached there.

What a question costs

The allowance is counted in AI tokens, which are ours and not the model provider's. A provider counts words. This counts requests, weighted by how much work is done for you:

RequestCost
Your own key1 token
Our key, one short question3 tokens
Our key, a long conversation or a large answer5 tokens

Bringing your own key is the cheapest on purpose.

Where "short" stops and "long" starts is decided by the backend, not by the app: a client that classified its own requests would be a client that charges itself one token. The thresholds are four messages in the conversation, six thousand characters across them, or an answer over 1,024 provider tokens.

The monthly allowance comes with the plan and expires with the month:

PlanAI tokens a month
Free50
Pro12,000
Max60,000
EnterpriseUnlimited

Top-up packs can be bought once and do not expire. The allowance is always spent first, and the balance is only touched once the month's allowance is gone. A charge that does not fit in what is left of the allowance comes out of the balance whole rather than being split.

What to use it for, and what not to

It is good at the mechanical half: what an API call takes, why a strategy will not compile, what a statistic in the report means, how to express a rule you have already decided on.

It is not a source of trading ideas that work, and a strategy it writes is a first draft that has never been tested. Run it, look at the trades, and treat a good result on one period with the same suspicion you would treat your own.

Do not paste broker credentials, account numbers or API secrets into the assistant. The request goes to a model provider. Everything else in this app keeps secrets on your machine, and this is the one place where a paste leaves it.

OrionQuant