You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- if you need to give space before text to format tabulation use keys     combination-->
4
-
# Pine Script Snippets
4
+
# Pine Script Snippets
5
5
6
6
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.
7
7
@@ -10,25 +10,24 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
10
10
> [Interested in contributing?](#instructions-to-contributors)
@@ -37,13 +36,12 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
37
36
<detailsopen>
38
37
<!-- leave a blank line after summary -->
39
38
<summary><b>Math:</b></summary>
40
-
41
39
<detailsopen>
42
40
<!-- leave a blank line after summary -->
43
41
<summary><b> • Random:</b></summary>
44
-
42
+
45
43
<!--####   -->
46
-
######     Randomness related snippets:
44
+
######     Randomness related snippets:
47
45
     • [Value in a range - Function](/./snippets/category/math/random/prng_range_function.md"generate a value within range 0 to parameter.")<br/>
48
46
     • [Value using Box Muller - Function](/./snippets/category/math/random/prng_Box_Muller_function.md"generate a value with bias towards a normal distribution.")<br/>
49
47
     • [Value with bias towards a level - Function](/./snippets/category/math/random/prng_weighed_bias_function.md"generate a value with bias towards a level.")<br/>
@@ -54,35 +52,35 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
######     Geometry related snippets:
76
+
######     Geometry related snippets:
79
77
    • [Draw Rectangle - Function](/./snippets/category/output/geometry/draw_rectangle_function.md"function to draw rectangles on chart.")<br/>
80
78
    • [Draw Trapezoid - Function](/./snippets/category/output/geometry/draw_trapezoid_function.md"function to draw trapezoids on chart.")<br/>
81
79
    • [Draw Triangle - Function](/./snippets/category/output/geometry/draw_triangle_function.md"function to draw triangles on chart.")<br/>
82
80
</details>
83
81
84
82
<!--####   -->
85
-
######   Output related snippets:
83
+
######   Output related snippets:
86
84
  • [blank](/./"blank.")<br/>
87
85
</details>
88
86
@@ -91,81 +89,21 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
91
89
<detailsopen>
92
90
<!-- leave a blank line after summary -->
93
91
<summary><b>Time:</b></summary>
94
-
92
+
95
93
<detailsopen>
96
94
<!-- leave a blank line after summary -->
97
95
<summary><b> • Date:</b></summary>
98
-
96
+
99
97
<!--####      -->
100
-
######     Date related snippets:
98
+
######     Date related snippets:
101
99
    • [Days in a month - Function](/./snippets/category/time/date/days_in_month_function.md"function to find how many days in a month.")<br/>
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.
@@ -175,19 +113,25 @@ You can contribute in three ways:
175
113
1. Do everything yourself:
176
114
- Fork the repo.
177
115
- Use the supplied snippet templates to format each of your snippet.
178
-
- Add snippet to an existing category or in the `uncategorized` category.
179
-
- Issue a PR.
116
+
- Add snippet to an existing most appropriate category (see `snippets/category`) or in the `snippets/category/misc` category.
117
+
- Issue a Pull Request (PR) to the main repo.
118
+
- Request a review from one of maintainers ([ricardosantos79](https://github.com/ricardosantos79), [LucFF](https://github.com/ricardosantos79), [everget](https://github.com/everget))
119
+
- Wait for review
120
+
- Apply the requested changes to your code if needed
180
121
1. Supply the code through GitHub without formatting your snippet:
181
122
- Fork the repo.
182
-
- Add your code in the `uncategorized` category.
183
-
- Issue a PR.
184
-
1. If you are not familiar with GitHub, you can just send your code in a text file to pinecoders@gmail.com. You can use the supplied templates to format your code, but it's not mandatory.
123
+
- Add your code in the `snippets/category/misc` category.
124
+
- Issue a Pull Request (PR) to the main repo.
125
+
- Request a review from one of maintainers ([ricardosantos79](https://github.com/ricardosantos79), [LucFF](https://github.com/ricardosantos79), [everget](https://github.com/everget))
126
+
- Wait for review
127
+
- Apply the requested changes to your code if needed
128
+
1. 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.
185
129
186
130
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.
187
131
188
132
### Notes
189
133
- Authors are recognized in each snippet.
190
-
-No coding conventions are mandatory. It's more important to share than to have uniform code. If you are interested in following a standard, use the[PineCoders Coding Conventions](http://www.pinecoders.com/coding_conventions).
134
+
-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](http://www.pinecoders.com/coding_conventions).
191
135
- 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.
192
136
- Templates are in the `snippets/templates` directory. There is one template for each type of snippet: *function*, *technique* and *variable*.
193
137
- Formatting inside the templates is a mix of [Markdown](https://github.com/adam-p/markdown-here/wiki) and HTML.
0 commit comments