Skip to content
TradequixDocsOpen the terminal
OverviewStart here, search, progress
  • Introduction
  • Quickstart
  • How a script runs
  • Types and qualifiers
  • Operators, conditionals and loops
  • Functions and methods
  • Objects and enums
  • Arrays, matrices and maps
  • Strings and colours
  • Time and sessions
  • Bar states
  • Plotting
  • Inputs
  • Technical analysis
  • Drawings and tables
  • Multiple timeframes
  • Strategies
  • Alerts in scripts
  • Repainting
  • The Pine editor
  • Indicator settings
  • Coming from TradingView
  • The data
  • Publish and sell
  • Catalogue and community
  • Your dashboard and earnings
  • Errors and debugging
  • Limits
  • Coverage
  • Built-in catalogue
  • Cookbook
  • Write Pine with AI
  • FAQ
  • Glossary
  • Cheat sheet
  • Function reference
  • Will it run here?
  • Error index

Start

Introduction

What Pine Script on Tradequix is, where your code runs, and how to read these docs.

View as MarkdownOpen in ClaudeOpen in ChatGPT

Tradequix runs Pine Script v6, the language TradingView made popular for indicators and strategies. You write a script in the editor, and it draws on the live chart in front of you: lines, histograms, markers, labels, tables, and strategy backtests.

The engine underneath is PineTS, an open-source runtime for Pine Script. It runs the same bar-by-bar model as Pine, so most scripts written for TradingView run here unchanged. Where they don't, it is almost always because of the data, and these docs say exactly where that happens.

Where your code runs#

Your script isIt runsWho can read the code
A draft or a private scriptIn your browser, in a background workerOnly you
Published open sourceIn each viewer's browserAnyone
Published protected or invite-onlyOn the Tradequix serverOnly you. Subscribers receive computed values, never the source.

Running in a worker means a slow script never freezes the chart. Running closed scripts on the server is what makes selling access possible without giving the code away.

A 60-second tour#

  1. Open the terminal at /chart and choose Pine Script in the side rail.
  2. The editor opens with a starter script. Press Add to chart (Ctrl Enter) and it draws.
  3. Change a number and add it again. The chart updates in place.
  4. Save (Ctrl S) keeps the script in your account.
  5. Publish puts it in the community catalogue, open or closed.

Every example in these docs has a Run button of its own. Try one:

RunnableTwo averages
1//@version=62indicator("Two averages", overlay = true)3fast = ta.ema(close, 21)4slow = ta.ema(close, 55)5plot(fast, "EMA 21", color = color.new(#8b7cff, 0), linewidth = 2)6plot(slow, "EMA 55", color = color.new(#ffb547, 0), linewidth = 2)

It runs on a fixed, generated EUR/USD-style series, so it works signed out and draws the same picture for everyone. Open in editor takes the code to the terminal, where it runs on the real feed.

How to read these docs#

  • Start gets you running and explains the one idea everything else depends on: a script runs once per bar.
  • Write covers each part of the language you will use: plots, inputs, ta.*, drawings, other timeframes, strategies, alerts.
  • On Tradequix is what is specific to this platform: the data, publishing and selling, and debugging.
  • Reference has the coverage tables, the built-in catalogue, a cookbook, and how to write Pine with an AI assistant.

Tip

Press Ctrl K (or /) anywhere in the docs to search pages, headings and functions like ta.rsi.

Next Quickstart

On this page

  • Where your code runs
  • A 60-second tour
  • How to read these docs

Use with AI

View as MarkdownOpen in ClaudeOpen in ChatGPT