Skip to content

Products Code editor

Write Pine Script.
See problems as you type.

The editor checks your script against the Pine Script that TrainBard supports, keeps the reference one click away, and turns every input into a field you can sweep.

No credit card. Paste your own supported strategy, or start from a built-in example.

Tryor hover a highlighted function
Pine Script Editor

Strategy Parameters · on the Test tab, detected from your inputs

Candle Size

A simplified copy of the editor. Labels, lint messages, examples, and the parameter count follow the app; the full editor adds autocomplete, folding, and a lint gutter.

Checks that speak plainly.

Diagnostics appear as you type: a marker on the line, the message, a syntax hint where one helps, and a button to the matching docs. The Test tab repeats the count beside Run, so nothing surprises you after you press it.

Error

Unknown function 'ta.smaa'. Did you mean 'ta.sma'?
Typos get a suggestion, not a mystery.

Error

Unknown named argument 'stop' for 'strategy.entry'; supported parameters: id, direction, qty, limit
Arguments are checked against the supported call shape.

Unsupported

Pine function '…' is known but unsupported in TrainBard.
Pine features TrainBard doesn't run are named as unsupported, not ignored.

The reference, beside the code.

Autocomplete suggests supported functions with their signatures and inserts them with fields you can tab through. Hover any function for its summary, or open the searchable Documentation panel without leaving the editor.

Documentation panel

Inputs, technical analysis, plots, strategy, math and strings, collections, and utilities, plus a guide to MCP access.

Public reference

The same compatibility guide is online at /learn/docs/, with a Markdown copy for coding agents.

Inputs become ranges

Every input.int, input.float, and other supported input appears as a field on the Test tab, ready for exact values or a range.

Start from a working strategy.

The Strategy Browser holds ten example strategies, from simple trend following to a stochastic pullback. Each explains its purpose and how to use it, and copies with one click.

  • SimpleSMA Trend Follow · RSI Mean Reversion · Volatility Band Reversion · Donchian Breakout · Fast vs Slow SMA Crossover
  • IntermediateEMA Trend With RSI Filter · MACD Momentum Shift · ATR Channel Breakout · Volume Confirmed Trend
  • AdvancedStochastic Pullback

Bring your own AI assistant.

AI Help copies a ready-made prompt: a generic starter, one with your current script, or one with your script and its diagnostics. It also links the AI compatibility guide. Review the prompt before you copy it. TrainBard does not send your script anywhere.

Save when you choose

Running a backtest does not save your strategy. Save it to your private Library when you want to keep it, and add immutable versions as the idea develops.

Keyboard first

Line numbers, folding, wrapping, and find and replace, with the shortcuts you expect.

AutocompleteCtrl Space
Next snippet fieldTab
Find / replaceCtrl/⌘ F
Next matchF3 or Ctrl/⌘ G
Undo / redoCtrl/⌘ Z · Ctrl Y or ⇧⌘ Z
Switch app tabsAlt 1–6

Write your first strategy.

Open the editor, pick an example, and run it across a range of settings.