Add(Array1, Array2) as Array OR Add(Array, Number) as Array

Add function returns the addition of the two arrays, item by item or the addition of each item of the array with the number.

 

This function has two parameters:
Array   An array, no matter the size.
Number   The number to add at each item of the array

 

Example:

' This is an indicator
' It does an average of a simple and an exponential moving averages.
Sub Main()
  TArr = SMA(GetClose, 10)
  TArr2 = EMA(GetClose, 10)
  SetIndic(Divide(Add(TArr, TArr2), 2))
End Sub