What you can build
The Pine Editor lets you write your own indicators and put them on the chart next to the built-in ones.
Open the Pine Editor tab in the bottom dock, write a script, and press Ctrl Enter. It appears on the chart like any other indicator, with a gear for its settings. Ctrl S saves it to your library.
The language is Pine-like. It is a subset of TradingView's Pine Script v5 that runs offline, inside this app, on the candles the replay has reached. Plenty of Pine indicators paste in and run, and many will not. When something is not supported, the editor tells you which line and what, instead of drawing something different. “Pine Script” is TradingView's trademark, and nothing here is affiliated with it.
What a script can do
- Draw lines, histograms, columns, areas and circles on the chart or in a pane of their own.
- Mark bars with shapes, arrows and characters, stripe the background, and recolour candles.
- Plot candles of its own, such as Heikin Ashi.
- Draw labels, lines, boxes, filled areas between lines, and tables, with hover tooltips on labels and table cells.
- Use another timeframe, such as a daily EMA on an M5 chart.
- Keep state in variables, arrays, maps, matrices, enums, and your own types with methods.
- Share functions, types and enums between scripts by saving them as a library and importing it.
- Expose settings (numbers, switches, colours, timeframes, sessions) that appear in the indicator's gear.
There is no strategy(). This app is for manual trading, and a script that placed orders would bypass the fill rules. Write an indicator() and make the decisions yourself.
Where to go next
Follow Your first script to run something in two minutes, then read How a script runs to know why a script cannot peek at the future.