diff --git a/guides/code_style/README.md b/guides/code_style/README.md index c7ac6bb..c2c82d8 100644 --- a/guides/code_style/README.md +++ b/guides/code_style/README.md @@ -1,5 +1,5 @@ -![logo](../../pinelong.png "Pine") +![logo](../../images/pinelong.png "Pine") # Pine Script Coding Conventions @@ -8,10 +8,14 @@ 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](#) ### Table of Contents -1. [TODO](#) + +1. [Script Structure](#script-structure) +1. [Naming Conventions](#naming-conventions) +1. [Line Wrapping](#line-wrapping) ## Script Structure @@ -38,28 +42,32 @@ Here is an example of a complete script: ``` code ``` + +**[Back to top](#table-of-contents)** + ## Naming Conventions ### Variable and Function Names -CamelCase is recommmended. Example: `emaLength`, `obLevel`, `showSignal2`, `aLongVariableName`. +CamelCase is recommended. Example: `emaLength`, `obLevel`, `showSignal2`, `aLongVariableName`. ### Function Parameter Names -Function parameters should be prefixed with the underscore in order to diffentiate them from global and local scope variables. Example: +Function parameters should be prefixed with the underscore in order to differentiate them from global and local scope variables. Example: ``` -daysInMonth( _year, _month) => +daysInMonth(_year, _month) => ``` ### Local Scope Variable Names > Do we need something here, to prevent inadvertent confusion with global scope vars? +**[Back to top](#table-of-contents)** + ## 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 diff --git a/pine.png b/images/pine.png similarity index 100% rename from pine.png rename to images/pine.png diff --git a/pinelong.png b/images/pinelong.png similarity index 100% rename from pinelong.png rename to images/pinelong.png diff --git a/functions/.gitkeep b/indicators/templates/.gitkeep similarity index 100% rename from functions/.gitkeep rename to indicators/templates/.gitkeep diff --git a/boilerplates/basic_strategy.pine b/strategies/templates/basic_strategy.pine similarity index 100% rename from boilerplates/basic_strategy.pine rename to strategies/templates/basic_strategy.pine diff --git a/boilerplates/crypto_strategy.pine b/strategies/templates/crypto_strategy.pine similarity index 100% rename from boilerplates/crypto_strategy.pine rename to strategies/templates/crypto_strategy.pine diff --git a/boilerplates/forex_strategy.pine b/strategies/templates/forex_strategy.pine similarity index 100% rename from boilerplates/forex_strategy.pine rename to strategies/templates/forex_strategy.pine diff --git a/boilerplates/stock_strategy.pine b/strategies/templates/stock_strategy.pine similarity index 100% rename from boilerplates/stock_strategy.pine rename to strategies/templates/stock_strategy.pine diff --git a/tricks/.gitkeep b/tricks/.gitkeep deleted file mode 100644 index e69de29..0000000