Pine Script Snippets
Welcome to the list of categorized Pine Script snippets available in the PineCoders repo. The snippets are divided in thematic categories. A snippet can be either a function, a piece of code implementing a particular technique, or variable definitions.
To access a snippet, just click on its name.
Snippets by category
Processing and filtering of data related snippets:
Array, list, matrix, time series related snippets:
Multiple use or unsorted snippets:
Geometry related snippets:
Output related snippets:
Instructions to contributors
First of all, thank you!
You can contribute in three ways:
- Do everything yourself:
- Fork the repo.
- Use the supplied snippet templates to format each of your snippet.
- Add snippet to an existing most appropriate category (see
snippets/category) or in the
- Issue a Pull Request (PR) to the main repo.
- Request a review from one of maintainers (ricardosantos79, LucFF, everget)
- Wait for review
- Apply the requested changes to your code if needed
- Supply the code through GitHub without formatting your snippet:
- If you are not familiar with GitHub, you can just send your code in a text file to firstname.lastname@example.org. In such case it's not mandatory to use the supplied templates to format your code.
We will revise and, if required, edit contributions to ensure they meet our publications standards. We will get in touch with you if we have questions.
- Authors are recognized in each snippet.
- We follow the idea to have uniform code for all snippets because we believe that such approach simplifies the use and sharing across users. We encourage you to follow this standard PineCoders Coding Conventions.
- Since the repo's code is meant to be used by Pine coders of all skill levels, care should be taken to document assumptions and proper use of your snippets. The example section in each snippet is often the best way to achieve that.
- Templates are in the
snippets/templatesdirectory. There is one template for each type of snippet: function, technique and variable.
- Formatting inside the templates is a mix of Markdown and HTML.
- Version 4 code is preferred. The templates allow for multiple versions of your snippets.