Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
category Rename category/miscellaneous folder Aug 22, 2019
templates Clean-up templates Aug 22, 2019
readme.md Correct snippets main document Aug 22, 2019

readme.md

PineCoders

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.

Interested in contributing?

Snippets by category

Data Structure:
 • Processing:
    Processing and filtering of data related snippets:

    • zScore - Function

  Array, list, matrix, time series related snippets:

  • Pseudo Array - Technique

Math:
 • Random:
    Randomness related snippets:

     • Value in a range - Function
     • Value using Box Muller - Function
     • Value with bias towards a level - Function
     • Value with bias towards a range - Function

Misc:
  Multiple use or unsorted snippets:

   • Nth Fibonacci

Output:
 • Geometry:
    Geometry related snippets:

    • Draw Rectangle - Function
    • Draw Trapezoid - Function
    • Draw Triangle - Function

  Output related snippets:

  • blank

Time:
 • Date:
    Date related snippets:

    • Days in a month - Function

  Time related snippets:

  • blank

Instructions to contributors

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:

  1. 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 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
  2. 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
  3. If you are not familiar with GitHub, you can just send your code in a text file to pinecoders@gmail.com. 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.

Notes

  • 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.

Back to top

You can’t perform that action at this time.