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.
Data Structure:
Math:
• Random:
• Value in a range - Function
• Value using Box Muller - Function
• Value with bias towards a level - Function
• Value with bias towards a range - Function
Output:
• Geometry:
• Draw Rectangle - Function
• Draw Trapezoid - Function
• Draw Triangle - Function
• blank
First of all, thank you! 💖 We hope this repo becomes the de facto reference for reusable Pine code, and this will only happen with contributions like yours.
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 thesnippets/category/misc
category. - 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:
- Fork the repo.
- Add your code in the
snippets/category/misc
category. - 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
- If you are not familiar with GitHub, you can just send your code in a text file to [email protected]. 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/templates
directory. 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.