Trading glossaryИнструменты

Pine Script

Pine Script is TradingView's programming language for creating custom indicators, strategies and alerts that run directly on its charts.

Explained

It is designed to be simple: a few lines can plot a moving average or define a strategy with entries, exits and backtest statistics. The current major version is Pine Script v5/v6.

Strategies written in Pine can be backtested in the Strategy Tester and connected to alerts that some brokers or third-party tools turn into orders.

Пример

A basic Pine indicator: //@version=5, indicator("EMA"), plot(ta.ema(close, 20)).

Three lines plot a 20-period EMA on any chart.

Типичные ошибки

01

Trusting Strategy Tester results without realistic commissions and slippage.

02

Using future data by mistake (look-ahead bias) with request.security.

03

Copying public scripts without understanding them.

Questions traders ask

Is Pine Script hard to learn?

It is one of the easiest trading languages; basic indicators can be written in an afternoon.

Can Pine Script place real trades?

Not directly; it triggers alerts that can be routed to brokers via integrations or webhooks.

We (www.marketpedia.eu) and selected third parties (1) collect personal information as specified in the privacy policy and use cookies or similar technologies for technical purposes and, with your consent, for measurement and “marketing (personalized ads)” as specified in the cookie policy.

With respect to advertising, we and 1237 selected , may use precise geolocation data, and identification through device scanning in order to store and/or access information on a device and process personal data like your usage data for the following : personalised advertising and content, advertising and content measurement, audience research and services development.

You can freely give, deny, or withdraw your consent at any time by accessing the preferences panel. Your choices apply only to this domain. Denying consent may make related features unavailable.

Use the “Accept” button to consent. Use the “Reject” button to continue without accepting.