| Substract(Array1, Array2) as Array OR Substract(Array, Number) as Array |
This function has two parameters:
| Array | An array, no matter the size. |
| Number | The number to substract at each item of the array |
Example:
|
' This is an indicator ' It shows the difference between the simple and the exponential moving averages. Sub Main() TArr = SMA(GetClose, 10) TArr2 = EMA(GetClose, 10) SetIndic(Substract(TArr, TArr2)) End Sub |