Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
78063a7
Update DISCLAIMER.md
LucFF Jul 22, 2019
182e3b0
Update DISCLAIMER.md
LucFF Jul 22, 2019
8cb2681
Update README.md
LucFF Jul 22, 2019
08c34ef
Update README.md
LucFF Jul 22, 2019
a5b45fe
Update README.md
LucFF Jul 22, 2019
3a7e66d
Update README.md
LucFF Jul 22, 2019
7137986
Update README.md
LucFF Jul 22, 2019
f23b58b
Update README.md
LucFF Jul 22, 2019
efc3a6e
Update README.md
LucFF Jul 22, 2019
5637c17
Update README.md
LucFF Jul 22, 2019
4eabff6
Add files via upload
LucFF Jul 22, 2019
c582362
Update README.md
LucFF Jul 22, 2019
4750dda
Update README.md
LucFF Jul 22, 2019
c3fb069
Update README.md
LucFF Jul 22, 2019
d4d3dca
Update README.md
LucFF Jul 22, 2019
b85e3b0
Update README.md
LucFF Jul 22, 2019
9d0d7cb
Update README.md
LucFF Jul 22, 2019
163d47f
Update README.md
LucFF Jul 22, 2019
94ba765
Update README.md
LucFF Jul 22, 2019
32ff718
Update README.md
LucFF Jul 22, 2019
d8d489c
Update README.md
LucFF Jul 22, 2019
61cc05e
Update README.md
LucFF Jul 22, 2019
2524c26
Update README.md
LucFF Jul 22, 2019
be482d3
Update README.md
LucFF Jul 22, 2019
945b8fa
Update README.md
LucFF Jul 22, 2019
981a691
Update README.md
LucFF Jul 22, 2019
69691c5
Update README.md
LucFF Jul 22, 2019
b1b3cb3
Update README.md
LucFF Jul 22, 2019
363f8c2
Add files via upload
LucFF Jul 22, 2019
01ab2c6
Update README.md
LucFF Jul 22, 2019
1bf17b5
Update README.md
LucFF Jul 22, 2019
339dae3
Update README.md
LucFF Jul 22, 2019
3a9808f
Update README.md
LucFF Jul 22, 2019
dae319f
Update README.md
LucFF Jul 22, 2019
cdf5780
Update README.md
LucFF Jul 22, 2019
d67c2ed
Update README.md
LucFF Jul 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DISCLAIMER.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
All information and code provided in this repository must be used at your own risk.

Neither authors, PineCoders management nor PineCoders may be held responsible for its use.

While the repository's information and code have been duly verified, we make no guarantee as to their validity.
24 changes: 19 additions & 5 deletions guides/code_style/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Pine Script Code Style Guide

![logo](../../pinelong.png "Pine")

# Pine Script Coding Conventions

## Introduction

The goal of this style guide is to present a set of best practices and style guidelines for Pine Script.
Please feel free to suggest any improvements you see fit.
The goal of these Coding Conventions is to present a set of best practices and style guidelines for Pine Script. By making Pine scripts easier to read, these guidelines make open source code more readable, while also providing safeguards that minimize the risk of errors for developers.

### Translations
1. [TODO](#)
Expand All @@ -23,7 +25,7 @@ The Pine compiler is not very strict on exact positioning of specific statements

1. The next lines should contain the script's **inputs**.

1. The following can contain **variable declarations** and **functions** in any order required. Note that all Pine functions are declared in the script's global scope, as nested function definitions are not allowed. Concerning variable declarations, some scripts lend themselves to mass declarations and others will be more readable with a *declare as you need* style that distributes declarations with the code where they are used. It's up to each coder to adopt the most useful style.
1. The following can contain **variable declarations** and **functions** in any order required. Note that all Pine functions are declared in the script's global scope, as nested function definitions are not allowed. Concerning variable declarations, some scripts lend themselves to mass declarations and others will be more readable with a *declare as you need* style that distributes declarations with the code where they are used. It's up to each coder to adopt the most useful style. In any case, declare variables that will only be used in a local block in that same local block.

1. The rest of the script will contain **calculations**, followed by,

Expand Down Expand Up @@ -51,6 +53,18 @@ daysInMonth( _year, _month) =>

### Local Scope Variable Names

[TODO-Luc](#) Need something here, imo, to prevent inadvertent confusion with global scope vars.
> Do we need something here, to prevent inadvertent confusion with global scope vars?

## Line Wrapping

When lines need to be continued on the next, use two spaces to indent the continuation line.


**[Back to top](#table-of-contents)**

# TODO

- [ ] Code example in Structure
- [ ] Decision on local block (for functions only?) var naming convention.


Binary file added pine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pinelong.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.