Free to write, validate, and backtest

Write indicators and strategies in plain JavaScript

No proprietary scripting language to learn. Write studies in JavaScript, optionally with WASM or WAT for heavy math, and use the same code for charting, backtests, optimization, and your AI assistant.

Coding and backtesting are free. Private indicators and strategies, and optimization, require a paid plan (Pro).

A complete indicator

const INDICATOR = {
    id: 'custom',
    label: 'Custom',
    inputs: {
        period: { default: 14, label: 'Period' },
        source: { default: 'close', label: 'Source', type: 'source' },
    },
    compute(inputs, data, bar) {
        const rsi = ta.rsi(inputs.source, inputs.period);
        return {
            plots: [{ name: 'RSI', value: rsi }],
            levels: [
                { value: 70, color: colors.red },
                { value: 30, color: colors.green },
            ],
        };
    },
};

RSI as a custom indicator in plain JavaScript. ta is the built-in technical analysis library.

From idea to chart

Open the code panel

Start from a template for an indicator or a strategy.

Write compute()

It runs once per bar. Call the built-in ta library for common math, or write your own.

See it on the chart

Plot on the price pane or a pane of its own, with colored levels.

Test it

Backtest the strategies you write for free. With Pro, optimize and walk-forward test them.

What you get

Plain JavaScript

No proprietary language. If you know JavaScript, you can write a study.

Built-in ta library

Common indicators ready to call, such as ta.rsi, so you spend time on your idea.

Inputs with defaults

Declare inputs with defaults, labels, and tooltips.

Plot where you want

Draw on the price pane or a new pane, with colored levels.

Strategies too

Place trades in code with buy, sell, short, and cover.

Optional WASM or WAT

Move heavy math into WebAssembly when you need speed.

Strategies use the same pattern

A strategy is a compute() function that runs once per bar and calls buy, sell, short, or cover. Backtesting, optimization, and walk-forward analysis run it with the same trade log and metrics as the built-in strategies.

const STRATEGY = {
    label: 'My Strategy',
    inputs: {
        period: { default: 14, label: 'Period' },
        source: { default: 'close', label: 'Source', type: 'source' },
    },
    compute(inputs, data, strategy) {
        const rsi = ta.rsi(inputs.source, inputs.period);
        if (strategy.position === 0 && rsi < 30) {
            strategy.buy();
        } else if (strategy.position === 1 && rsi > 50) {
            strategy.sell();
        }
        return {
            plots: [{ name: 'RSI', value: rsi }],
        };
    },
};

A simple RSI strategy: buy when RSI is below 30, sell when it passes 50. An example, not a recommendation.

Free to write and backtest. Pro to optimize.

Writing, validating, and backtesting are free with a free account. Private studies, optimization, and walk-forward analysis need Pro.

Strategy backtesting →

What is included for free

What Pro adds

Frequently asked questions

Do I need Pro to write my own indicators?

No. Coding in JavaScript and backtesting are included with a free account. Private indicators and strategies, and optimization and walk-forward analysis, require Pro.

Is it a custom language?

No. Studies are written in JavaScript, with optional WASM or WAT.

Can an AI assistant write my indicators?

Yes. Connect Claude, ChatGPT, Cursor, or another MCP client to write and validate studies by conversation. The MCP server is free for every account.

Historical simulations do not predict future results. Educational use only; not financial advice.

Write your first indicator

Open a free account with just an email, and start coding in your browser. No card required.

Related