From TradingView Wiki
Jump to: navigation, search
Language: English  • 日本語 • Русский

Pine Script has single-line comments only. Any text from the symbol // until the end of the line is considered as comment. An example:

// This line is a comment
a = close // This is also a comment

Script Editor has hotkeys for commenting/uncommenting block of code: Ctrl + / Thanks to this, there is no need for multi-line comments - one can highlight the large code fragment in Script Editor and press Ctrl + /. This will comment out highlighted fragment; if Ctrl + / is pressed again, commentary will be taken away.

Also, comments could not be placed in the middle of a statement wrapped to several lines, read more here: Lines Wrapping.

Previous: Structure of the Script, Next: Identifiers, Up: Pine Script Tutorial