Skip to content
Algo Trade Analytics Docs

+= - Pine Script Operator

+=

Addition assignment. Applicable to numerical expressions or strings.

expr1 += expr2

For strings returns concatenation of expr1 and expr2. For numbers returns integer or float value, or series of values.

  • You may use arithmetic operators with numbers as well as with series variables. In case of usage with series the operators are applied elementwise.
//@version=6indicator("+=")// Equals to expr1 = expr1 + expr2.a = 2b = 3a += b// Result: a = 5.plot(a)