Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
talib.SIN
Calculates the sine of each element (Vector Trigonometric Sin).
talib.SIN(inReal)Examples
Compute the sine of a few numbers.
javascript
function main() {
var data = [-3.14/2, 0, 3.14/2]
var ret = talib.SIN(data)
// Output: about [-1, 0, 1]
Log(ret)
}
python
import talib
import numpy as np
def main():
data = [-3.14/2, 0, 3.14/2]
ret = talib.SIN(np.array(data))
# Output: about [-1, 0, 1]
Log(ret)Returns
| Type | Description |
numeric array | Results, the same length as the input. |
Arguments
| Name | Type | Required | Description |
inReal |
| Yes | K-line array (close prices are used) or numeric array; in Python, pass a numeric array such as |
See Also
Remarks
TA-Lib equivalent: SIN(Records[Close]) = Array(outReal).