The TradingView Community Scripts section contains three types of scripts traders can use: indicators, strategies, and libraries. They have many similarities, but each specific type of script is tailored for its own use case.
Indicators are general purpose scripts that can perform any calculations programmed by the author and display them on a chart. It can be something very simple, like a moving average, or something very complex, like a screener that monitors dozens of symbols and looks for several different signals. The Alert functionality that the indicators have allows you to get notified when some specific condition has been met; the specific condition can be set up by either the user of the author of the indicator in question.
Indicators can be found in the "Indicators. Metrics & Strategies" dialogue available above the chart, or in the Community Scripts section.
Strategies are tailored for backtesting, i.e., testing an existing trading strategy on historical data to check it viability. To do this, they provide users with a vast array of functions to emulate real-life trading. You can specify your initial capital and position size, emulate commission and margin trading, use different order types that allow you to create profit/loss brackets and trailing stops, and much more. Strategies are calculated by a strategy engine that creates position entries and exits and showcases them on the chart, and for extra precision, the engine emulates the intrabar price movement to execute price-based orders correctly. Strategies also support the Alert functionality, and along with alerts that are set up by the author of the script, they can also have alerts that send notifications whenever a position changes.
Strategies can be found in the "Indicators. Metrics & Strategies" dialogue available above the chart, or in the Community Scripts section. In the former, strategies are additionally denoted with a special symbol:
Once loaded on a chart, you can access an indicator or strategy's configuration parameters using the Settings dialog box, accessible from the script's pop-up menu. Strategies use an additional Properties tab to configure parameters specific to backtesting, such as initial capital and commission. Strategies also display entries and exits on the chart with the arrow markers and show the detailed backtesting information in the Strategy Tester pane under the chart:
Libraries are publications containing functions that can be reused in Pine Script™ indicators, strategies, or in other libraries. They are useful to define frequently-used functions so their source code does not have to be included in every script where they are needed. Once a library is published, other scripts can import it via the `import` keyword. Libraries are meant to be imported in code, not to be added on the chart directly, which is why they are not found in the "Indicators. Metrics & Strategies" at all, but you can filter for libraries in the Community Scripts section.
Strategies and indicators can be published in one of three modes: open-source, protected or invite-only. See here for more information on the publication types. Libraries are always published open-source.
For more information on script publishing, consult the "Publishing" section of our Pine User Manual.