-
pinescript: Identifiers개발 2023. 6. 2. 01:25
identifier: name that you give to an element in the code
such as variable,function,constant,etc
For example,int fastLength = 7, fastLength is an identifier for a variable.
-Begin with uppercase or lowercase or and underscore(_)-case sensitive
e.g.
myVar _myVar my123Var functionName MAX_LEN max_len maxLen 3barsDown // NOT VALID!
-recommends using uppercase SNAKE_CASE for constants and camelCase for other identifiers
SNAKE_CASE: all letters are uppercase,use underscore(_)to separate
camelCase: First letter lowercase,subsequent uppercase
-These are not rules just conventionsGREEN_COLOR = #4CAF50 MAX_LOOKBACK = 100 int fastLength = 7 // Returns 1 if the argument is `true`, 0 if it is `false` or `na`. zeroOne(boolValue) => boolValue ? 1 : 0
'개발' 카테고리의 다른 글
pinescript: loops (0) 2023.06.06 pinescript: conditional structures (0) 2023.06.05 pinescript: variable declaration (0) 2023.06.04 pinescript: Operators (0) 2023.06.02 pinescript: objects,parameter (0) 2023.06.01