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

Divide function returns the division of the two arrays, item by item or the division of each item of the array with the number. If a division by zero occurs, the result will be zero.

 

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

 

Example:

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