What is Pine Script?
Pine Script is a programming language developed by TradingView, used for writing proprietary indicators and strategies that can be added to your chart and used in technical analysis.
There is a special editor in the lower panel of your chart, specifically designed for writing and editing code. Additionally, this editor can function as an auto-highlighter, designed to highlight variables, functions, and tooltips. Essentially, it auto-highlights the built-in elements (variables and functions) of the language and sends hints in pop-up windows with additional information that appears when you hover over specific elements with your cursor.
The finished indicator can be added to the chart, saved for further use and editing, or published in our Community Scripts.
How to Start?
Basic reference materials:
- User Manual - detailed documentation describing the main features, syntax and structure of the language, Pine Script, and how it works with the Community Scripts;
- Reference Material - quick reference material for all functions, variables, and keywords available in Pine, with examples on how to use each. You can open our Reference Material directly in the editor via pop-up window; and
- PineCoders Resources - an independent community of active and experienced Pine Script users who write instructions to help beginners and maintain their own knowledge base
We have created a simplified section where anyone can get acquainted with the structure of our language by using the simple script example that has been split up into individual parts for your convenience.
Another way to learn the language is through TradingView’s own built-in indicators that are written in Pine. The code for these indicators are open and readily accessible to anyone. Simply select your prefered indicator from the list and it will appear in the editor. Then experiment by making changes to the code.
In addition, you can find examples of other authors' work in our Community Scripts. An extensive number of them are open source scripts that are available to users.
Pine Script Development
Our Pine Script language is constantly developing and improving. We focus on feedback and try to expand the language to meet your needs. You can follow the updates on our release notes page, in the Tradingview chat or in the telegram channel, PineCoders Squawk Box.
What do I do if I still have questions?
If you cannot find what you are interested in within our reference materials, you can ask questions in the Tradingview chat where Pine Script is specifically discussed, or on the StackOverflow website, where we have a separate tag listed.