Skip to content

Commit 837fcd9

Browse files
author
everget
committed
Correct snippets main document
1 parent 1ff3a31 commit 837fcd9

File tree

1 file changed

+32
-88
lines changed

1 file changed

+32
-88
lines changed

snippets/readme.md

Lines changed: 32 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![PineCoders](/images/PineCodersLong.png "PineCoders")
22

33
<!-- if you need to give space before text to format tabulation use keys &ensp; &emsp; combination-->
4-
# Pine Script Snippets
4+
# Pine Script Snippets
55

66
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.
77

@@ -10,25 +10,24 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
1010
> [Interested in contributing?](#instructions-to-contributors)
1111
1212
## Snippets by category
13-
<!-- -->
1413

1514
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
1615
<!-- Data Structure Category: -->
1716
<details open>
1817
<!-- leave a blank line after summary -->
1918
<summary><b>Data Structure:</b></summary>
20-
19+
2120
<details open>
2221
<!-- leave a blank line after summary -->
2322
<summary><b>&emsp;• Processing:</b></summary>
24-
23+
2524
<!--#### &emsp;&emsp;&emsp;&emsp; -->
26-
###### &emsp;&emsp;&emsp; Processing and filtering of data related snippets:
25+
###### &emsp;&emsp;&emsp; Processing and filtering of data related snippets:
2726
&emsp;&emsp;&emsp;&emsp;[zScore - Function](/./snippets/category/data_structure/processing/zscore_function.md "Standardization using zScore.")<br/>
2827
</details>
2928

3029
<!--#### &emsp; -->
31-
###### &emsp; Array, list, matrix, time series related snippets:
30+
###### &emsp; Array, list, matrix, time series related snippets:
3231
&emsp;&emsp;[Pseudo Array - Technique](/./snippets/category/data_structure/pseudo_array_technique.md "Pseudo Array - Technique.")<br/>
3332
</details>
3433

@@ -37,13 +36,12 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
3736
<details open>
3837
<!-- leave a blank line after summary -->
3938
<summary><b>Math:</b></summary>
40-
4139
<details open>
4240
<!-- leave a blank line after summary -->
4341
<summary><b>&emsp;• Random:</b></summary>
44-
42+
4543
<!--#### &emsp; -->
46-
###### &emsp;&emsp;&emsp; Randomness related snippets:
44+
###### &emsp;&emsp;&emsp; Randomness related snippets:
4745
&emsp;&emsp;&emsp;&emsp;[Value in a range - Function](/./snippets/category/math/random/prng_range_function.md "generate a value within range 0 to parameter.")<br/>
4846
&emsp;&emsp;&emsp;&emsp;[Value using Box Muller - Function](/./snippets/category/math/random/prng_Box_Muller_function.md "generate a value with bias towards a normal distribution.")<br/>
4947
&emsp;&emsp;&emsp;&emsp;[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
5452

5553

5654
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
57-
<!-- Miscellaneous Category: -->
55+
<!-- Misc Category: -->
5856
<details open>
5957
<!-- leave a blank line after summary -->
60-
<summary><b>Miscellaneous:</b></summary>
61-
58+
<summary><b>Misc:</b></summary>
59+
6260
<!--#### &emsp; Miscellaneous:-->
63-
###### &emsp; Multiple use or unsorted snippets:
64-
&emsp;&emsp;[Nth Fibonacci](/./snippets/category/miscellaneous/nth_fibonacci.md#function-to-find-nth-fibonacci "Find the Nth Fibonacci sequence number.")
61+
###### &emsp; Multiple use or unsorted snippets:
62+
&emsp;&emsp;[Nth Fibonacci](/./snippets/category/misc/nth_fibonacci.md#function-to-find-nth-fibonacci "Find the Nth Fibonacci sequence number.")
6563
</details>
6664

6765
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
6866
<!-- Output Category: -->
6967
<details open>
7068
<!-- leave a blank line after summary -->
7169
<summary><b>Output:</b></summary>
72-
70+
7371
<details open>
7472
<!-- leave a blank line after summary -->
7573
<summary><b>&emsp;• Geometry:</b></summary>
76-
74+
7775
<!--#### &emsp;&emsp;&emsp;&emsp; -->
78-
###### &emsp;&emsp;&emsp; Geometry related snippets:
76+
###### &emsp;&emsp;&emsp; Geometry related snippets:
7977
&emsp;&emsp;&emsp;&emsp;[Draw Rectangle - Function](/./snippets/category/output/geometry/draw_rectangle_function.md "function to draw rectangles on chart.")<br/>
8078
&emsp;&emsp;&emsp;&emsp;[Draw Trapezoid - Function](/./snippets/category/output/geometry/draw_trapezoid_function.md "function to draw trapezoids on chart.")<br/>
8179
&emsp;&emsp;&emsp;&emsp;[Draw Triangle - Function](/./snippets/category/output/geometry/draw_triangle_function.md "function to draw triangles on chart.")<br/>
8280
</details>
8381

8482
<!--#### &emsp; -->
85-
###### &emsp; Output related snippets:
83+
###### &emsp; Output related snippets:
8684
&emsp;&emsp;[blank](/./ "blank.")<br/>
8785
</details>
8886

@@ -91,81 +89,21 @@ Welcome to the list of categorized Pine Script snippets available in the PineCod
9189
<details open>
9290
<!-- leave a blank line after summary -->
9391
<summary><b>Time:</b></summary>
94-
92+
9593
<details open>
9694
<!-- leave a blank line after summary -->
9795
<summary><b>&emsp;• Date:</b></summary>
98-
96+
9997
<!--#### &emsp;&emsp;&emsp;&emsp; -->
100-
###### &emsp;&emsp;&emsp; Date related snippets:
98+
###### &emsp;&emsp;&emsp; Date related snippets:
10199
&emsp;&emsp;&emsp;&emsp;[Days in a month - Function](/./snippets/category/time/date/days_in_month_function.md "function to find how many days in a month.")<br/>
102100
</details>
103101

104102
<!--#### &emsp; -->
105-
###### &emsp; Time related snippets:
103+
###### &emsp; Time related snippets:
106104
&emsp;&emsp;[blank](/./ "blank.")<br/>
107105
</details>
108106

109-
110-
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
111-
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
112-
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
113-
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
114-
<!-- ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• -->
115-
<br/>
116-
<br/>
117-
<br/>
118-
<br/>
119-
<br/>
120-
<br/>
121-
<br/>
122-
<details close>
123-
<!-- leave a blank line after summary -->
124-
<summary>Template</summary>
125-
126-
#### Category A Snippets
127-
Perhaps a description is usefull..
128-
1. Snippet A1
129-
2. Snippet A2 family:
130-
* Snippet A2.1
131-
* Snippet A2.2
132-
3. Snippet A3
133-
134-
<details open>
135-
<!-- leave a blank line after summary -->
136-
<summary>Category B</summary>
137-
138-
#### Category B Snippets
139-
Perhaps a description is usefull..
140-
141-
***
142-
143-
<details open>
144-
<!-- leave a blank line after summary -->
145-
<summary>Sub Category BA1</summary>
146-
147-
1. Snippet SB1
148-
2. Snippet SB2 family:
149-
* Snippet SB2.1
150-
* Snippet SB2.2
151-
3. Snippet SB3
152-
</details>
153-
154-
***
155-
156-
1. Snippet B1
157-
2. Snippet B2
158-
3. Snippet B3 family:
159-
* Snippet B3.1
160-
* Snippet B3.2
161-
4. Snippet B3
162-
</details>
163-
164-
</details>
165-
166-
167-
<br>
168-
169107
## Instructions to contributors
170108

171109
First of all, **thank you!** &#128150;&ensp; 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:
175113
1. Do everything yourself:
176114
- Fork the repo.
177115
- 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
180121
1. Supply the code through GitHub without formatting your snippet:
181122
- 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.
185129

186130
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.
187131

188132
### Notes
189133
- 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).
191135
- 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.
192136
- Templates are in the `snippets/templates` directory. There is one template for each type of snippet: *function*, *technique* and *variable*.
193137
- Formatting inside the templates is a mix of [Markdown](https://github.com/adam-p/markdown-here/wiki) and HTML.

0 commit comments

Comments
 (0)