Skip to content

Commit 2ebab32

Browse files
authored
Update README.md
1 parent 1b896c3 commit 2ebab32

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

coding_conventions/README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ The Pine compiler is not very strict on exact positioning of specific statements
3434

3535
1. The first Pine statement in the script should be either the `study()` or `strategy()` declaration statement.
3636

37-
1. The next lines should contain the script's **inputs**.
37+
1. The next lines should contain the following sections, properly identified if they are long:
38+
39+
- Constant initializations
40+
- Inputs
41+
- Functions
42+
- Calculations
43+
- Strategy calls (for strategies)
44+
- Plots
45+
- Alerts
3846

3947
1. The following lines can contain **variable initializations** and **function definitions** in any order required. Note that all Pine functions must be defined in the script's global scope, as nested function definitions are not allowed. Concerning variable initializations, some scripts lend themselves to mass initializations and others will be more readable with an *initialize as you need* style that places initializations with the code segments where the variables are used. It's up to each coder to adopt the most useful style. Local block variables must be declared in the local block where they will be used.
4048

0 commit comments

Comments
 (0)