English
Get it — $19

TradingView

Pine Script

Definition

Pine Script is TradingView's own programming language for writing indicators and strategies that run on its charts. Most built-in and community indicators on TradingView are written in it.

Example

Say you want a 20-bar simple moving average on your chart. In Pine Script that takes one line calling the built-in ta.sma function, under a short header that names the version and declares an indicator, and TradingView recalculates it on every bar of any chart you open. Declare the script as a strategy instead and add entry and exit rules, and the Strategy Tester shows how those rules would have traded on past bars.

Hypothetical numbers, for illustration only.

UpTickFlow is our product. These guides are education, not financial advice. Trading involves a substantial risk of loss.